Embed presentation
Download to read offline





![HOW IT WORKS:
ROUTER
from django.conf.urls import url, include
from rest_framework import routers
from tutorial.quickstart import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
url(r'^', include(router.urls)),
url(r'^apiauth/', include('rest_framework.urls'))
]](https://image.slidesharecdn.com/djangorestframeworkin20minuten-150418012415-conversion-gate02/85/Django-rest-framework-in-20-minuten-6-320.jpg)


The document introduces Django REST framework, which makes it easy to build web APIs. It includes serializers to convert data to and from JSON/XML, an API browser, and security features out of the box. Serializers define how models are exposed in the API. Views provide endpoints and connect models and serializers. Routers automatically generate URLs and handle requests to the views. The framework handles common tasks like validation and HTTP status codes so APIs can be built quickly.





![HOW IT WORKS:
ROUTER
from django.conf.urls import url, include
from rest_framework import routers
from tutorial.quickstart import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
url(r'^', include(router.urls)),
url(r'^apiauth/', include('rest_framework.urls'))
]](https://image.slidesharecdn.com/djangorestframeworkin20minuten-150418012415-conversion-gate02/85/Django-rest-framework-in-20-minuten-6-320.jpg)
