Skip to content

Instantly share code, notes, and snippets.

@shangxiao
Created July 31, 2015 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shangxiao/afbd2b02a56c08260a38 to your computer and use it in GitHub Desktop.
Save shangxiao/afbd2b02a56c08260a38 to your computer and use it in GitHub Desktop.
Django is_authenticated gotcha
def some_view(request):
if request.user.is_authenticated:
do_something_private()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment