Using Python, JavaScript, HTML, and CSS, complete the implementation of a social network that allows users to make posts, follow other users, and like posts.
All requirements can be viewed here: https://cs50.harvard.edu/web/2020/projects/4/network/
You must be registered to use options such as commenting, profile picture, following and so on.
To set up this project on your computer:
- Clone the project
- Install all necessary dependencies
pip install -r requirements.txt
- Make a migration
python manage.py migrate
Abstract django user
- get_following_user - return all followings
- is_like - is user like that post?
- is_dislike - is user dislike that post?
Contains User Model extension with additional fields.
Fields:
- name - user's name
- username - id of user
Contains all post info.
Fields:
- user - who posted the post
- content - post's inner text
- date - post's publication date
- like - many to many with user
- dislike - many to many with user
Contains all who follows who info.
Fields:
- user - user who is following
- user_followed - user who is being followed
Here you can:
- View all posts
- Edit posts (if you are the post's creator; only for logged-in users)
- Like them (only for logged-in users)
- Create a new post (only for logged-in users)
(only for logged-in users)
Here you can:
- View all user's posts
- Edit posts (if you are the post's creator)
- Like them
- Follow the user (if you are not this user)
(only for logged-in users)
Controls all actions regarding liking:
- Add a new like (change like btn color)
- Add a new Dislike (change dislike btn color)
- toggle between like and dislikes
(only for logged-in users)
Here you can:
- View all posts created by followed users
- Like them
(only for logged-in users)
Controls following/unfollowing users (only POST method allowed).
Controls logging in.
Controls logging out.
Controls registration.