Skip to content

NomadBYlife/News-test_task-

Repository files navigation

Test task

About

In this project, tasks were implemented according to the technical task(file with description is inside)

Stack used

Python
Django
DRF
JWT authenticated
Celery
Docker

Quick Start

Quick guide for MacOs/Linux:

If you are using SSH: git clone [email protected]:NomadBYlife/News-test_task-.git

If https: git clone https://github.com/NomadBYlife/News-test_task-.git

Enter next command:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate

Create superuser(admin):
python manage.py createsuperuser

Username: admin
Email: if you want, not necessary
Password: admin
Confirm password: admin

Go to the admin part and fill in the "Rating Score". For example 1,2,3
Starting with docker-compose:

  1. Go to /application/settings uncomment the parameter "REDIS_HOST='redis'"
  2. Enter command in terminal docker-compose up --build

Staring with terminal:

  1. Go to /application/settings uncomment the parameter "REDIS_HOST='0.0.0.0'"
  2. Enter command in terminal python manage.py runserver

API endpoints:
http://127.0.0.1:8000/api/v1/news/ - all articles
http://127.0.0.1:8000/api/v1/news/vendorecode(id) - getting a specific article (takes VendorCode(Id) as a parameter)
JWT authentication
http://127.0.0.1:8000/api/v1/token/
http://127.0.0.1:8000/api/v1/token/refresh/
http://127.0.0.1:8000/api/v1/token/verify/
Only for authenticated users http://127.0.0.1:8000/api/v1/news/my_news/ - getting all user articles
http://127.0.0.1:8000/api/v1/news/my_news/vendorecode(id) - update/delete a specific user article
http://127.0.0.1:8000/api/v1/news/my_news/favorites/ - list of user's favorite articles
http://127.0.0.1:8000/api/v1/news/my_news/create/ - create a new article

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published