diff options
| author | Tom Christie | 2013-04-26 14:59:21 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-04-26 14:59:21 +0100 | 
| commit | 8fa79a7fd38dda015afa658084361c6da2856e46 (patch) | |
| tree | ef8080a9d24b488402429c0bae101e3f395f1f8b /docs/tutorial/6-viewsets-and-routers.md | |
| parent | e301e2d974649a932ab9a7ca32199c068fa30495 (diff) | |
| download | django-rest-framework-8fa79a7fd38dda015afa658084361c6da2856e46.tar.bz2 | |
Deal with List/Instance suffixes for viewsets
Diffstat (limited to 'docs/tutorial/6-viewsets-and-routers.md')
| -rw-r--r-- | docs/tutorial/6-viewsets-and-routers.md | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/docs/tutorial/6-viewsets-and-routers.md b/docs/tutorial/6-viewsets-and-routers.md index 876d89ac..25a974a1 100644 --- a/docs/tutorial/6-viewsets-and-routers.md +++ b/docs/tutorial/6-viewsets-and-routers.md @@ -105,8 +105,8 @@ Here's our re-wired `urls.py` file.      # Create a router and register our viewsets with it.      router = DefaultRouter() -    router.register(r'snippets', views.SnippetViewSet, 'snippet') -    router.register(r'users', views.UserViewSet, 'user') +    router.register(r'snippets', views.SnippetViewSet, name='snippet') +    router.register(r'users', views.UserViewSet, name='user')      # The API URLs are now determined automatically by the router.      # Additionally, we include the login URLs for the browseable API. @@ -148,4 +148,4 @@ We've reached the end of our tutorial.  If you want to get more involved in the  [sandbox]: http://restframework.herokuapp.com/  [github]: https://github.com/tomchristie/django-rest-framework  [group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework -[twitter]: https://twitter.com/_tomchristie
\ No newline at end of file +[twitter]: https://twitter.com/_tomchristie | 
