This is my code to load EditScreen for User Model.
@login_required ()
def getUser (request, userId):
if request.method == "GET":
my_record = User.objects.get(user_id=userId)
form = UserUpdateForm (instance=my_record)
print "Registration page loading..."
return render(request, "EN/updateuser.html", {'form': form } )
But 'user_id' (PrimaryKey) is not going as part of 'form' when I get request for update User I'm not able to get the object instance to update it. How to set it along with the form so that I should be able to read it. I thought of setting it through Hidden Value but I felt that is not a safe way.
Please suggest.