From dd14c6c88ba210bac8349041b8db486576539249 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 3 Nov 2014 11:21:29 +0000 Subject: Latest docs release --- topics/2.3-announcement.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'topics/2.3-announcement.html') diff --git a/topics/2.3-announcement.html b/topics/2.3-announcement.html index 5fb6e05f..27da50d8 100644 --- a/topics/2.3-announcement.html +++ b/topics/2.3-announcement.html @@ -223,7 +223,7 @@ a.fusion-poweredby {
"""
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
@@ -244,10 +244,10 @@ router.register(r'groups', GroupViewSet)
# 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, which demonstrates their usage.