some restyling and updated requirements.txt for yaml support

This commit is contained in:
markotibold 2011-06-26 01:38:56 +02:00
parent 9be3d38aa0
commit 8cab127c2a
4 changed files with 8 additions and 6 deletions

View File

@ -1,8 +1,8 @@
from django.conf.urls.defaults import patterns, url from django.conf.urls.defaults import patterns, url
from permissionsexample.views import PermissionsExampleView, ThrottlingExampleView, LoggedinView from permissionsexample.views import PermissionsExampleView, ThrottlingExampleView, LoggedInExampleView
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'^$', PermissionsExampleView.as_view(), name='permissions-example'), url(r'^$', PermissionsExampleView.as_view(), name='permissions-example'),
url(r'^throttling$', ThrottlingExampleView.as_view(), name='throttled-resource'), 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'),
) )

View File

@ -29,8 +29,10 @@ class ThrottlingExampleView(View):
""" """
return "Successful response to GET request because throttle is not yet active." 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, ) permissions = (IsAuthenticated, )
def get(self, request): def get(self, request):
return 'Logged in or not?' return 'Logged in or not?'

View File

@ -22,7 +22,7 @@ class Sandbox(View):
4. A generic object store API. 4. A generic object store API.
5. A code highlighting API. 5. A code highlighting API.
6. A blog posts and comments 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.""" Please feel free to browse, create, edit and delete the resources in these examples."""

View File

@ -3,4 +3,4 @@
Django==1.2.4 Django==1.2.4
wsgiref==0.1.2 wsgiref==0.1.2
coverage==3.4 coverage==3.4
yaml==3.10