Skip to content

Instantly share code, notes, and snippets.

@stuntgoat
Created November 26, 2011 02:15
Show Gist options
  • Save stuntgoat/1394843 to your computer and use it in GitHub Desktop.
Save stuntgoat/1394843 to your computer and use it in GitHub Desktop.
@login_required decorator example portion
# if the client request does not contain a valid session id, the
# client will receive a redirect to http://10.0.0.2/signin/
@login_required(login_url='/signin/')
def user_home_view(request):
# . . . returns the user's home view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment