# Topic covered
* API
* Why would we need an API?
* Types of APIs based on scope of use
* Types of APIs based on architecture
* WEB API
* What Is GraphQL? REST vs. GraphQL
[Read More]
2. Rest Framework
Django Rest Framework
# Topic covered
* REST API
* REST Architectural Constraints
* Methods of REST API
[Read More]
3. DRF Serialization
Serializer and Model Serializer
# Topic covered
* Serialization
* Serializer
* ModelSerializer
* Regular Django views
* List View, Detail View
* Customize the serialization behavior
[Read More]
4. DRF Function based View
Requests and Responses, Function based View
# Topic covered
* Request Object
* Response Object
* DRF provides two wrappers to write API views
* Function based views - @api_view
* Class based views - APIView
* Function based views - @api_view
[Read More]
5. DRF Class-based Views
APIview, Mixins, Generic - Class Based Views
# Topic covered
* Class-based Views
* APIview
* Mixins class based views
* Generic class based views
[Read More]
6. DRF ViewSets & Routers
ViewSet, ModelViewSet, ReadOnlyModelViewSet, GenericViewSet
# Topic covered
* ViewSets
* viewsets.ViewSet
* viewsets.ModelViewSet
* ReadOnlyModelViewSet
* GenericViewSet
* Routers
* SimpleRoute
* DefaultRouter
* Trade-offs between views vs viewsets
[Read More]
7. Relationships & Hyperlinked APIs
ModelSerializer, HyperlinkedModelSerializer
# Topic covered
* ModelSerializer vs HyperlinkedModelSerializer
* ReadOnlyField
* PrimaryKeyRelatedField
* StringRelatedField
* SlugRelatedField
* HyperlinkedRelatedField
* HyperlinkedIdentityField
* Display related model
[Read More]
8. Authentication & Permissions
TokenAuthentication, SessionAuthentication, BasicAuthentication
# Topic covered
* Authentication
* Authentication vs Authorization
* How authentication is determined
* Setting the authentication scheme
* Types of Authentication
* TokenAuthentication
* SessionAuthentication
* BasicAuthentication
* Permissions
[Read More]
9. TokenAuthentication
Django-rest-auth, Dj-rest-auth
# Topic covered
* TokenAuthentication
* Django-rest-auth
[Read More]
03-Django Adv
𝗖𝗿𝗼𝘀𝘀-𝗢𝗿𝗶𝗴𝗶𝗻 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲 𝗦𝗵𝗮𝗿𝗶𝗻𝗴 (𝗖𝗢𝗥𝗦)
𝗖𝗿𝗼𝘀𝘀-𝗢𝗿𝗶𝗴𝗶𝗻 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲 𝗦𝗵𝗮𝗿𝗶𝗻𝗴 (𝗖𝗢𝗥𝗦)
CORS is a security mechanism enforced by web browsers to restrict cross-origin HTTP requests.
CORS is a mechanism implemented by browsers that block websites to request data from some other URL.
When a browser makes a request, it adds an origin header to the request message.
If it goes to the server of the exact origin, it is allowed by the browser; if it does not, the browser blocks it.
gets error like Cross-Origin Request Blocked