Last active
December 14, 2015 10:28
-
-
Save renooble/5071777 to your computer and use it in GitHub Desktop.
Decorating Django methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://docs.djangoproject.com/en/1.4/topics/auth/#the-login-required-decorator | |
from django.contrib.auth.decorators import login_required | |
@login_required | |
def my_view(request): | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment