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 /api-guide/format-suffixes.html | |
| parent | ce165805481988e95887bf62c45cd616af5bba0f (diff) | |
| download | django-rest-framework-dd14c6c88ba210bac8349041b8db486576539249.tar.bz2 | |
Latest docs release
Diffstat (limited to 'api-guide/format-suffixes.html')
| -rw-r--r-- | api-guide/format-suffixes.html | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/api-guide/format-suffixes.html b/api-guide/format-suffixes.html index 47ed1a5c..0531f75c 100644 --- a/api-guide/format-suffixes.html +++ b/api-guide/format-suffixes.html @@ -219,12 +219,13 @@ used all the time.</p>  </ul>  <p>Example:</p>  <pre class="prettyprint lang-py"><code>from rest_framework.urlpatterns import format_suffix_patterns +from blog import views -urlpatterns = patterns('blog.views', -    url(r'^/$', 'api_root'), -    url(r'^comments/$', 'comment_list'), -    url(r'^comments/(?P<pk>[0-9]+)/$', 'comment_detail') -) +urlpatterns = [ +    url(r'^/$', views.apt_root), +    url(r'^comments/$', views.comment_list), +    url(r'^comments/(?P<pk>[0-9]+)/$', views.comment_detail) +]  urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'html'])  </code></pre> | 
