
Home - Django REST framework
Django REST framework is a powerful and flexible toolkit for building Web APIs. Some reasons you might want to use REST framework: The Web browsable API is a huge usability win for your developers.
Quickstart - Django REST framework
If you want to get a more in depth understanding of how REST framework fits together head on over to the tutorial, or start browsing the API guide. Documentation built with MkDocs .
Requests - Django REST framework
REST framework's Request objects provide flexible request parsing that allows you to treat requests with JSON data or other media types in the same way that you would normally deal with form data..data. request.data returns the parsed content of the request body. This is similar to the standard request.POST and request.FILES attributes except that:
Tutorials and Resources - Django REST framework
Beginner's Guide to the Django REST Framework; Django REST Framework - An Introduction; Django REST Framework Tutorial; Building a RESTful API with Django REST Framework; Getting Started with Django REST Framework and AngularJS; End to End Web App with Django REST Framework & AngularJS; Start Your API - Django REST Framework Part 1
Documenting your API - Django REST framework
To be fully RESTful an API should present its available actions as hypermedia controls in the responses that it sends. In this approach, rather than documenting the available API endpoints up front, the description instead concentrates on the media types that are used.
Views - Django REST framework
In addition to the documentation here, the Classy Django REST Framework resource provides a browsable reference, with full methods and attributes, for each of Django REST Framework's class-based views.
1 - Serialization - Django REST framework
In the same way that Django provides both Form classes and ModelForm classes, REST framework includes both Serializer classes, and ModelSerializer classes. Let's look at refactoring our serializer using the ModelSerializer class.
2 - Requests and responses - Django REST framework
REST framework introduces a Request object that extends the regular HttpRequest, and provides more flexible request parsing. The core functionality of the Request object is the request.data attribute, which is similar to request.POST , but more useful for working with Web APIs.
Authentication - Django REST framework
The Django REST framework OAuth package provides both OAuth1 and OAuth2 support for REST framework. This package was previously included directly in the REST framework but is now supported and maintained as a third-party package.
Routers - Django REST framework
REST framework adds support for automatic URL routing to Django, and provides you with a simple, quick and consistent way of wiring your view logic to a set of URLs. Usage. Here's an example of a simple URL conf, that uses SimpleRouter.
- 某些结果已被删除