Table of Contents
- Main page with information of the most liked posts and open discussions.
- Chats section.
- Page with posts where user can sort posts by date added or most likes.
- Discussions where users can discus, and if author receives a reply, they can close the discussion.
- Profiles containing information about the user, including their bio, photo, Telegram ID, chess profile URL, information about whether the user is a subscriber, user's posts, and posts liked by the user and authors can edit their profile and posts.
- Docker 24.0.6
-
Clone the repo.
$ git clone git@github.com:YuriiDorosh/chess-forum.git
-
Define environment variables
$ cd chess-forum $ nano .env
SECRET_KEY=my_django_key POSTGRES_DB=my_database POSTGRES_USER=my_database_user POSTGRES_PASSWORD=my_database_password
-
Build and run docker compose by predefined
make
command.$ make setup
WARNING!
If database connection fails, try again in a few seconds. It could be because postress server is not running yet.
- python 3.10
- pip
-
Clone the repo.
$ git clone git@github.com:YuriiDorosh/chess-forum.git
-
Activate virtual environment.
$ cd chess-forum $ python3 -m venv venv $ source venv/bin/activate
-
Install requirements.
(venv) $ pip install -r requirements.txt
-
Define environment variables
$ nano .env
SECRET_KEY=my_django_key POSTGRES_DB=my_database POSTGRES_USER=my_database_user POSTGRES_PASSWORD=my_database_password
-
User
Inheritance of the model from AbstractUser.Includes the following information about the user: first name, last name, username, user bio (optional field), user photo (optional field), telegram user id (optional field), link to chess profile (optional field), whether the user is a subscriber to the service (by default False), and the date when the user was registered.
UserPost
Model inheritance from BaseModel.Includes the following information about the user post: user id, post title, game link(optional field), body of post, and the date when the post was added.
Like
Model inheritance from BaseModel.Includes the following information: user id, post id, date added.
UserPostImage
Model inheritance from Model.Includes the following information: post id, image
Room
Model inheritance from BaseModel.Includes the following information about the room: name, slug, if the room is premium(by default False), and the date when the room was created.
Message
Model inheritance from BaseModel.Includes the following information: room id, user id, content of the message, and date when user write the message.
Discussion
Model inheritance from BaseModel.Includes the following information about the discussion: title of the discussion, text, author(user) id, image(optional field), closed(by default False), and the date when discussion was created.
Reply
Model inheritance from BaseModel.Includes the following information about the reply: discussion id, text, author id, image(optional field), and the date when reply was writing.
ReplyLike
Model inheritance from BaseModel.Includes the following information about: reply id, user id, date added.
This project is licensed under the MIT License. You can find the license details in the LICENSE file. Feel free to use, modify, and distribute the code as per the terms of the MIT License.
Yurii Dorosh