Created
December 5, 2013 12:25
-
-
Save oguya/7804409 to your computer and use it in GitHub Desktop.
get userid without using request object
This file contains 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
from django.contrib.auth.models import User | |
User.objects.get(username=the_username).pk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment