diff options
| author | Tom Christie | 2014-09-26 14:39:20 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-26 14:39:20 +0100 |
| commit | ac71d9aaae27f620fdb0167a4ad586e754a844a3 (patch) | |
| tree | 15c19362b95cc72f104f1d41a6799399ba97d36f /docs/topics | |
| parent | 609014460861fdfe82054551790d6439292dde7b (diff) | |
| parent | 411511622d163ad81720651869b80dc9de526d65 (diff) | |
| download | django-rest-framework-ac71d9aaae27f620fdb0167a4ad586e754a844a3.tar.bz2 | |
Merge master
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/2.3-announcement.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/2.3-announcement.md b/docs/topics/2.3-announcement.md index ba435145..7c800afa 100644 --- a/docs/topics/2.3-announcement.md +++ b/docs/topics/2.3-announcement.md @@ -15,7 +15,7 @@ As an example of just how simple REST framework APIs can now be, here's an API w """ A REST framework API for viewing and editing users and groups. """ - from django.conf.urls.defaults import url, patterns, include + from django.conf.urls.defaults import url, include from django.contrib.auth.models import User, Group from rest_framework import viewsets, routers @@ -36,10 +36,10 @@ As an example of just how simple REST framework APIs can now be, here's an API w # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browseable API. - urlpatterns = patterns('', + urlpatterns = [ url(r'^', include(router.urls)), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) - ) + ] The best place to get started with ViewSets and Routers is to take a look at the [newest section in the tutorial][part-6], which demonstrates their usage. |
