diff options
| author | Tom Christie | 2014-11-03 11:21:29 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-11-03 11:21:29 +0000 |
| commit | dd14c6c88ba210bac8349041b8db486576539249 (patch) | |
| tree | 81b1e22fb8080a8d3915ae6a5db95edf87a3bfb6 /topics/2.3-announcement.html | |
| parent | ce165805481988e95887bf62c45cd616af5bba0f (diff) | |
| download | django-rest-framework-dd14c6c88ba210bac8349041b8db486576539249.tar.bz2 | |
Latest docs release
Diffstat (limited to 'topics/2.3-announcement.html')
| -rw-r--r-- | topics/2.3-announcement.html | 6 |
1 files changed, 3 insertions, 3 deletions
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 { <pre class="prettyprint lang-py"><code>""" 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')) -) +] </code></pre> <p>The best place to get started with ViewSets and Routers is to take a look at the <a href="../tutorial/6-viewsets-and-routers">newest section in the tutorial</a>, which demonstrates their usage.</p> <h2 id="simpler-views">Simpler views</h2> |
