I need to get User ID inside from my code (not in Django template).
I've success in template, but not inside the App.
Someone can help me?
I need to get User ID inside from my code (not in Django template).
I've success in template, but not inside the App.
Someone can help me?
here is how you can get a logged in user id in your view:
def user_id(request):
user = request.user
print user.id