Renamed UserInstance to UserDetail in docs

This commit is contained in:
Danilo Bargen 2013-02-25 21:31:12 +01:00
parent 8da83f0df9
commit 70db398595
3 changed files with 6 additions and 6 deletions

View File

@ -123,7 +123,7 @@ The template name is determined by (in order of preference):
An example of a view that uses `TemplateHTMLRenderer`:
class UserInstance(generics.RetrieveUserAPIView):
class UserDetail(generics.RetrieveUserAPIView):
"""
A view that returns a templated HTML representations of a given user.
"""
@ -301,4 +301,4 @@ Comma-separated values are a plain-text tabular data format, that can be easily
[juanriaza]: https://github.com/juanriaza
[mjumbewu]: https://github.com/mjumbewu
[djangorestframework-msgpack]: https://github.com/juanriaza/django-rest-framework-msgpack
[djangorestframework-csv]: https://github.com/mjumbewu/django-rest-framework-csv
[djangorestframework-csv]: https://github.com/mjumbewu/django-rest-framework-csv

View File

@ -72,14 +72,14 @@ We'll also add a couple of views. We'd like to just use read-only views for the
serializer_class = UserSerializer
class UserInstance(generics.RetrieveAPIView):
class UserDetail(generics.RetrieveAPIView):
model = User
serializer_class = UserSerializer
Finally we need to add those views into the API, by referencing them from the URL conf.
url(r'^users/$', views.UserList.as_view()),
url(r'^users/(?P<pk>[0-9]+)/$', views.UserInstance.as_view()),
url(r'^users/(?P<pk>[0-9]+)/$', views.UserDetail.as_view()),
## Associating Snippets with Users

View File

@ -123,7 +123,7 @@ After adding all those names into our URLconf, our final `'urls.py'` file should
views.UserList.as_view(),
name='user-list'),
url(r'^users/(?P<pk>[0-9]+)/$',
views.UserInstance.as_view(),
views.UserDetail.as_view(),
name='user-detail')
))
@ -173,4 +173,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
[twitter]: https://twitter.com/_tomchristie