Insta Cook in the Django
- As already mentioned the error in the last session was due to adding the file url.py at the wrong path.
- In Django, Once the model is created we can use serializers as shown below
- The serializer created can be used in Views, Django rest_framework supports multiple API Views
- Now try to add necessary path configuration in
urls.py
in api_instacook
- Now link this in the project’s urls.py module
- Now start the application and navigate to
http://localhost:8000/recipes/list
- Django generates the documentation where we can explore and run the api as well
- Next Steps: We have to create views and also match the api url patterns to what is required as per our needs