Like or Unlike Tweets - Django Wednesdays Twitter #16

Опубликовано: 12 Октябрь 2024
на канале: Codemy.com
2,943
119

In this video I'll show you how to Like or Unlike Tweets (or Meeps) for our Twitter Clone App With Django and Python.

We'll tweak our Meep Model to track likes, and we'll build a little count function.

Then we'll create a function in our views.py file to add or remove a like based on the user.

#django #codemy #JohnElder

Timecodes

0:00​​ - Introduction
0:52 - Add Likes To Meep Model
2:46 - Make and Push Migration
3:47 - Add Meep_Like Function to Views.py
7:13 - Add Meep_Like URL
8:20 - Exclude Likes From Forms.py
9:08 - Tweak Homepage To Add Meep Count
10:12 - Like Meep Link on Homepage
12:18 - Unlike Meep Link on Homepage
14:09 - Test On Another User
14:45 - See Likes On Admin Page
15:02 - Conclusion