Answers for "access id of django query html"

-1

how to get user id django

def sample_view(request):
    current_user = request.user
    print current_user.id
Posted by: Guest on May-22-2020
1

django get form id from request

# html
<input type="submit" value="Reply" name ="message_frm">

# views.py
if 'message_frm' in request.POST:
    #do somethings
Posted by: Guest on October-15-2020

Python Answers by Framework

Browse Popular Code Answers by Language