get user model django python code example
Example 1: django user fields
# Django User Model Fields
username
first_name
last_name
email
password
groups
user_permissions
is_staff
is_active
is_superuser
last_login
date_joined
Example 2: how to get user id django
def sample_view(request):
current_user = request.user
print current_user.id