A blog built by Django framework and has features such as comment system, star rating system, separate author and manager, hot articles, most visited articles (visit counting system), API, ....
These instructions allow you to get a copy of the running project on your local machine.
You need to have a 3.X version of Python
-
Make a git clone or download it in zip
git clone https://github.com/irania9O/My-Django-Blog.git
-
Get in the directory
cd My-Django-Blog -
Install from your terminal with pip requirements.txt:
pip install -r requirements.txt
-
Create new migrations based on the changes you have made to your models:
python manage.py makemigrations
-
Apply migrations:
python manage.py migrate
-
To Create an admin user
python manage.py createsuperuser
python manage.py runserverNow, open a Web browser and go to “/admin/” on your local domain – e.g., http://127.0.0.1:8000/admin/. You should see the admin’s login screen and home page on your local domain – e.g., http://127.0.0.1:8000/.
-
All API requests require the use of a generated Token or API Key. You can find your API key, on blew routers.
POST /api/rest-auth/login/ POST /api/rest-auth/registration/ POST /api/token/ POST /api/token/refresh/
Header Type Required Description AuthorizationstringYes "Bearer "+"Your JWT access token"
-
Users are limited based on their position on the site.
Position Permissions SuperUser/api/comments/-/api/rest-auth/-/api/token/-/api/articles/-/api/users/Author/api/comments/-/api/rest-auth/-/api/token/-/api/articles/Member/api/comments/-/api/rest-auth/-/api/token/-/api/articles/-> ReadOnly
-
Api returns the following status codes in its API:
Status Code Description 200 OK201 CREATED400 BAD REQUEST401 UNAUTHORIZED404 NOT FOUND500 INTERNAL SERVER ERROR





