mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 18:09:59 +03:00
Merge 1be2ad21b8
into 9f455fbc07
This commit is contained in:
commit
16115c1010
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
We're going to create a simple API to allow admin users to view and edit the users and groups in the system.
|
We're going to create a simple API to allow admin users to view and edit the users and groups in the system.
|
||||||
|
|
||||||
Create a new Django project, and start a new app called `quickstart`. Once you've set up a database and got everything synced and ready to go open up the app's directory and we'll get coding...
|
Create a new Django project called `rest_framework_tutorial`, and start a new app called `quickstart`. Set up a database and get everything synced. Open up the app's directory to get coding...
|
||||||
|
|
||||||
## Serializers
|
## Serializers
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ We can easily break these down into individual views if we need to, but using vi
|
||||||
|
|
||||||
## URLs
|
## URLs
|
||||||
|
|
||||||
Okay, now let's wire up the API URLs. On to `quickstart/urls.py`...
|
Okay, now let's wire up the API URLs. On to `rest_framework_tutorial/urls.py`...
|
||||||
|
|
||||||
from django.conf.urls import patterns, url, include
|
from django.conf.urls import patterns, url, include
|
||||||
from rest_framework import routers
|
from rest_framework import routers
|
||||||
|
@ -85,6 +85,7 @@ We'd also like to set a few global settings. We'd like to turn on pagination, a
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
...
|
...
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
|
'quickstart',
|
||||||
)
|
)
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user