In the second part of the project, we'll implement querying using F expressions and Q operators, work with Django signals and receivers, and integrate the voting and searching logic throughout our models, views, and templates.
Part of course:
Hands-on Assignment: Creating a Reddit Clone Part 2
- Step 1: Django Signals & Adding Automated Counts for Comments
- Receivers
- F operator
- Step 2: Add Voting Logic
- Toggling the User Vote
- Figuring out What a User's Vote Is
- Updating Upvote and Downvote Counts
- Using Signals to Automatically Update Counts
- Writing the View Function
- Updating urls.py
- Updating the templates
- Step 3: Add Search
- Conclusion
Show admin stats