mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 21:14:01 +03:00
Changed IsAdmin -> IsAdminUser in example
This commit is contained in:
parent
71a93930fd
commit
65d4970bf7
|
@ -27,7 +27,7 @@ For example:
|
||||||
* Only admin users are able to access this view.
|
* Only admin users are able to access this view.
|
||||||
"""
|
"""
|
||||||
authentication_classes = (authentication.TokenAuthentication,)
|
authentication_classes = (authentication.TokenAuthentication,)
|
||||||
permission_classes = (permissions.IsAdmin,)
|
permission_classes = (permissions.IsAdminUser,)
|
||||||
|
|
||||||
def get(self, request, format=None):
|
def get(self, request, format=None):
|
||||||
"""
|
"""
|
||||||
|
@ -123,4 +123,4 @@ REST framework also gives you to work with regular function based views...
|
||||||
**[TODO]**
|
**[TODO]**
|
||||||
|
|
||||||
[cite]: http://reinout.vanrees.org/weblog/2011/08/24/class-based-views-usage.html
|
[cite]: http://reinout.vanrees.org/weblog/2011/08/24/class-based-views-usage.html
|
||||||
[cite2]: http://www.boredomandlaziness.org/2012/05/djangos-cbvs-are-not-mistake-but.html
|
[cite2]: http://www.boredomandlaziness.org/2012/05/djangos-cbvs-are-not-mistake-but.html
|
||||||
|
|
Loading…
Reference in New Issue
Block a user