Steps to run the project:
- Create a virtual environment and clone the git repository
- Move into the directory blog using command "cd blog" in command line
- Install the dependencies using the command "pip install -r requirements.txt" in command line
- Apply the migrations using the command "python manage.py migrate" in command line
- Create a super user for testing of APIs using the command "python manage.py createsuperuser" in command line
- Download Postman using the link https://www.postman.com/downloads/
- Open the application and import the Api collection in the repository named Blog Apis.postman_collection.json
- To run the development server and test the APIs use the command "python manage.py runserver"
- Inside the postman collection all the APIs are added along with working examples
- To use the APIs you will need the authorization key: For that use the "Generate auth token API" and get the token from response and use it in all the other APIs by passing it in headers with Key as Authorization and value as Token "token_value"
- Remember to hit the post APIs after using delete APIs as the record id might mismatch
- To run the test cases hit the command "python manage.py test" in command line
- The API documentation on Postman will look something like this