access id of django query html code example
Example 1: how to get user id django
def sample_view(request):
current_user = request.user
print current_user.id
Example 2: 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