MicroServices Classroomnotes 21/Dec/2021

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
    Preview
  • The serializer created can be used in Views, Django rest_framework supports multiple API Views
    Preview
  • Now try to add necessary path configuration in urls.py in api_instacook
    Preview
  • Now link this in the project’s urls.py module
    Preview
  • 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
    Preview
    Preview
    Preview
  • Next Steps: We have to create views and also match the api url patterns to what is required as per our needs

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner