aboutsummaryrefslogtreecommitdiffstats
path: root/docs/topics/2.3-announcement.md
diff options
context:
space:
mode:
authorCollin Anderson2014-09-23 17:08:38 -0400
committerCollin Anderson2014-09-23 17:10:02 -0400
commitda385c9c1f9deeeefd705154a6e6612d6d62f41b (patch)
treeeb878800eb479fdf072b8315282ec2b1fdea8ba2 /docs/topics/2.3-announcement.md
parent8495cd898a5d34f00858a379b54e39cd19ded215 (diff)
downloaddjango-rest-framework-da385c9c1f9deeeefd705154a6e6612d6d62f41b.tar.bz2
remove patterns and strings from urls #1898
Diffstat (limited to 'docs/topics/2.3-announcement.md')
-rw-r--r--docs/topics/2.3-announcement.md6
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.