mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
some restyling and updated requirements.txt for yaml support
This commit is contained in:
parent
9be3d38aa0
commit
8cab127c2a
|
@ -1,8 +1,8 @@
|
|||
from django.conf.urls.defaults import patterns, url
|
||||
from permissionsexample.views import PermissionsExampleView, ThrottlingExampleView, LoggedinView
|
||||
from permissionsexample.views import PermissionsExampleView, ThrottlingExampleView, LoggedInExampleView
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', PermissionsExampleView.as_view(), name='permissions-example'),
|
||||
url(r'^throttling$', ThrottlingExampleView.as_view(), name='throttled-resource'),
|
||||
url(r'^loggedin$', LoggedinView.as_view(), name='loggedin-resource'),
|
||||
url(r'^loggedin$', LoggedInExampleView.as_view(), name='loggedin-resource'),
|
||||
)
|
||||
|
|
|
@ -29,8 +29,10 @@ class ThrottlingExampleView(View):
|
|||
"""
|
||||
return "Successful response to GET request because throttle is not yet active."
|
||||
|
||||
class LoggedinView(View):
|
||||
|
||||
class LoggedInExampleView(View):
|
||||
"""
|
||||
You can login with **'test', 'test'.**
|
||||
"""
|
||||
permissions = (IsAuthenticated, )
|
||||
def get(self, request):
|
||||
return 'Logged in or not?'
|
|
@ -22,7 +22,7 @@ class Sandbox(View):
|
|||
4. A generic object store API.
|
||||
5. A code highlighting API.
|
||||
6. A blog posts and comments API.
|
||||
7. A basic example using permissions. You can login with **'test', 'test'.**
|
||||
7. A basic example using permissions.
|
||||
|
||||
Please feel free to browse, create, edit and delete the resources in these examples."""
|
||||
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
Django==1.2.4
|
||||
wsgiref==0.1.2
|
||||
coverage==3.4
|
||||
|
||||
yaml==3.10
|
||||
|
|
Loading…
Reference in New Issue
Block a user