Module: ragendja.auth.decorators
@staff_only
The @staff_only view decorator only renders the view if request.user.is_staff is True. Otherwise it renders a no_access.html template (which you have to create yourself).
Module: ragendja.middleware
LoginRequiredMiddleware
This saves you from typing @login_required all the time.
Example:
MIDDLEWARE_CLASSES = (
...,
'ragendja.middleware.LoginRequiredMiddleware',
)
LOGIN_REQUIRED_PREFIXES = (
'/some/path/',
'/other/path/',
)
NO_LOGIN_REQUIRED_PREFIXES = (
'/some/path/without_login/',
)With this you require login for all paths that start with '/other/path' or '/some/path/' except for '/some/path/without_login/'. IOW, NO_LOGIN_REQUIRED_PREFIXES overrides LOGIN_REQUIRED_PREFIXES.
The best poker blog http://poker-blogs-see.blogspot.com
Best PokerStars? blog http://pokerstars-blogs.blogspot.com
Sexy, hot girls image http://china-sexy-girl-images.blogspot.com/