Follow and Unfollow Buttons - Django Wednesdays Twitter #6

Описание к видео Follow and Unfollow Buttons - Django Wednesdays Twitter #6

In this video I'll show you how to create Follow and Unfollow buttons on each profile page of our Twitter Clone App with Django and Python.

Following and Unfollowing users is pretty important in any Twitter Clone App. Setting it up is pretty simple.

We'll add the buttons to the profile pages using Bootstrap, then add the functionality to the Views.py file on the backend.

#django #codemy #JohnElder

Timecodes

0:00​​ - Introduction
1:15 - Add Form To Profile Page
2:14 - Add CSRF Token
2:28 - Follow Unfollow Logic
4:16 - Unfollow Button
5:40 - Follow Button
7:54 - Check For POST on Views.py
8:20 - Get Current User
8:54 - Get Form Data
9:20 - Views.py Follow/Unfollow Logic
11:01 - Save Updated Profile
11:20 - Conclusion

Комментарии

Информация по комментариям в разработке