My very first educational Django project (spring 2023)
- clone the repository:
git clone https://github.com/OneHandedPirate/NewsPaperProject.git - cd to the project folder:
cd NewsPaperProject - create and activate virtual environment:
virtualenv venvsource venv/bin/activate - install all dependencies:
pip install -r requirements.txt - create
.envfile with the following variables:DJANGO_SK- DJANGO Secret Key;EMAIL_HOST_USER- email (used to send emails to users);EMAIL_HOST_PASSWORD- email app password;EMAIL_HOST- SMTP address;EMAIL_PORT- SMTP port;EMAIL_USE_TLS- boolean;EMAIL_USE_SSL- boolean;
- start dev server:
python manage.py runserver
- Superuser is already created. Login: admin, password: 12345
NewsPaperProject is a simple website built using Django, where authenticated users can write articles on any topic. Users can also comment on and rate articles written by other users. Additionally, users have the ability to subscribe to specific categories of articles.
- Registration:
When registering one can choose to become author. Authors can write the Articles and News as well as create new categories. Non-author users can become author any moment. - Social Authentication:
Users can log in using their Google account. - Search:
Users can search for posts using author/post title/publish date. - Subscription to category:
Authenticated users can subscribe categories. When new post is published all subscribed users are notified viw email. Subscription to category is implemented via AJAX-requests (without reloading the page) - Add comments:
Authenticated users can add comments to posts. Comment authors can also delete them. Implemented via AJAX-requests. - Post edition/deletion:
Authors can edit or delete their own posts. - Voting:
Authenticated users can vote on posts (but not their authors). Implemented via AJAX-requests. - Feedback:
Authenticated users can send feedback via Contact Us form. Feedback is sent to your email (EMAIL_HOST_USER).
-
Main page with the list of posts. The categories subscribed by the current user are dark.

-
Post details page. Edit and delete buttons are visible only for author of the post.

-
Comment on the post page. Delete button is visible only for author of the comment.

-
Add post page. The add post and add category menu navbar items are visible only for authors.






