Django

From Sinfronteras
Revision as of 00:12, 4 May 2023 by Adelo Vieira (talk | contribs) (Created page with "https://www.djangoproject.com/ <br /> ==Recipe REST API - Udemy course== https://www.udemy.com/course/django-python-advanced/ '''API Features:''' * 19 API Endpoints : Man...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

https://www.djangoproject.com/



Recipe REST API - Udemy course

https://www.udemy.com/course/django-python-advanced/


API Features:

  • 19 API Endpoints
Managing users, recipes, tags, ingredients
  • User Authentication
  • Browseable Admin Interface (Django Admin)
  • Browsable API (Swagger)


Techologies used in this course:

  • Django allows handle:
  • URL Mappings
  • Object Relational Mapper
  • Admin site
  • Django REST Framework:
  • Django add-on
  • Build REST APIs
  • PostgresSQL
  • Docker
  • Swagger:
  • Documentation
  • Browsable API (testing)


Structure of the project:

  • app/ : Main app - Django project
  • app/core/ : Hangle any code shared between multiple apps. Such as the DB definition using the Django modules
  • app/user/ : User related code. Such as User registration & auth tokens
  • app/recipe/ : Recipe related code. Such as handling updating ingredients - Creating/Deleting/Udating recipes


Unit Tests and Test-driven development (TDD):
See explanation at https://www.udemy.com/course/django-python-advanced/learn/lecture/32238668#notes


  • Unit Tests: Code which test code:
It's usually done this way:
  • You Set up some conditions; such as inputs to a function
  • Then you run a piece of code
  • Checks outputs of that code using "assertions"


Test-driven development (TDD)