- JWT Auth
- API Testing
- Custom commands
Before begining, make sure the following prerequisites are installed on your system:
Python (3.6 or higher)
Docker (only if using Docker)
Git
pip
-
git clone
url
-
python manage.py migrate
-
docker-compose build
-
docker-compose up
-
git clone
url
-
pip install -r requirements.txt
-
python manage.py migrate
-
Navigate to the settings.py file in the project folder and set USE_REDIS attribute to False
# settings.py USE_REDIS = False
-
python manage.py createcachetable
-
python manage.py runserver
- Navigate to the settings.py file in the project folder and set USE_REDIS attribute to False
# settings.py USE_REDIS = False
- python manage.py test
Always note the token and copy it as you will use it to create, delete, or update blogs.
-
Registration (three arguments - username, email, password)
python manage.py register 'username' 'email' 'password'
-
Login (two arguments - username, email, password)
python manage.py register 'email' 'password'
-
Logout (single argument - token)
python manage.py logout 'token'
-
Fetch All the Blogs
python manage.py fetchblogs
-
Fetch A single the Blog (single argument - blog_id)
python manage.py fetchblog <blog_id>
-
Create a new Blog (three arguments - title, content, token)
python manage.py create 'title' 'content' 'token'
-
Update a Blog (four arguments - blog_id, title, content, token)
python manage.py update <blog_id> 'title' 'content' 'token'
-
Delete a Blog (two arguments - blog_id, token)
python manage.py update <blog_id> 'token'