Skip to content

Commit

Permalink
some restyling and updated requirements.txt for yaml support
Browse files Browse the repository at this point in the history
  • Loading branch information
markotibold committed Jun 25, 2011
1 parent 9be3d38 commit 8cab127
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/permissionsexample/urls.py
Original file line number Diff line number Diff line change
@@ -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'),
)
6 changes: 4 additions & 2 deletions examples/permissionsexample/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ def get(self, request):
"""
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?'
2 changes: 1 addition & 1 deletion examples/sandbox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
Django==1.2.4
wsgiref==0.1.2
coverage==3.4

yaml==3.10

0 comments on commit 8cab127

Please sign in to comment.