サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
iPhone 16
www.django-rest-framework.org
viewsets.py ViewSets After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. — Ruby on Rails Documentation Django REST framework allows you to combine the logic for a set of related views in a single class, called a ViewSet. In other frameworks you may also find conceptually similar imp
Quickstart We're going to create a simple API to allow admin users to view and edit the users and groups in the system. Project setup Create a new Django project named tutorial, then start a new app called quickstart. # Create the project directory mkdir tutorial cd tutorial # Create a virtual environment to isolate our package dependencies locally python3 -m venv env source env/bin/activate # On
authentication.py Authentication Auth needs to be pluggable. — Jacob Kaplan-Moss, "REST worst practices" Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token that it was signed with. The permission and throttling policies can then use those credentials to determine if the request should be per
Django REST framework 3.6 The 3.6 release adds two major new features to REST framework. Built-in interactive API documentation support. A new JavaScript client library. Above: The interactive API documentation. Funding The 3.6 release would not have been possible without our backing from Mozilla to the project, and our collaborative funding model. If you use REST framework commercially and would
Django REST framework 3.4 The 3.4 release is the first in a planned series that will be addressing schema generation, hypermedia support, API clients, and finally realtime support. Funding The 3.4 release has been made possible a recent Mozilla grant, and by our collaborative funding model. If you use REST framework commercially, and would like to see this work continue, we strongly encourage you
exceptions.py Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. — Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate error responses. The handled exceptions are: Subclasses of APIException
pagination.py Pagination Django provides a few classes that help you manage paginated data – that is, data that’s split across several pages, with “Previous/Next” links. — Django documentation REST framework includes support for customizable pagination styles. This allows you to modify how large result sets are split into individual pages of data. The pagination API can support either: Pagination
test.py Testing Code without tests is broken as designed. — Jacob Kaplan-Moss REST framework includes a few helper classes that extend Django's existing test framework, and improve support for making API requests. APIRequestFactory Extends Django's existing RequestFactory class. Creating test requests The APIRequestFactory class supports an almost identical API to Django's standard RequestFactory
routers.py Routers Resource routing allows you to quickly declare all of the common routes for a given resourceful controller. Instead of declaring separate routes for your index... a resourceful route declares them in a single line of code. — Ruby on Rails Documentation Some Web frameworks such as Rails provide functionality for automatically determining how the URLs for an application should be
Django REST framework 3.0 The 3.0 release of Django REST framework is the result of almost four years of iteration and refinement. It comprehensively addresses some of the previous remaining design issues in serializers, fields and the generic views. This release is incremental in nature. There are some breaking API changes, and upgrading will require you to read the release notes carefully, but t
REST, Hypermedia & HATEOAS You keep using that word "REST". I do not think it means what you think it means. — Mike Amundsen, REST fest 2012 keynote. First off, the disclaimer. The name "Django REST framework" was decided back in early 2011 and was chosen simply to ensure the project would be easily found by developers. Throughout the documentation we try to use the more simple and technically cor
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. Authentication policies including packages for OAuth1a and OAuth2. Serialization that supports both ORM and non-ORM data sources. Customizable all the way down - just use regular f
このページを最初にブックマークしてみませんか?
『Home - Django REST framework』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く