Hi,
I set up an URL when cliking a submit button, I got http://myhost.com/user/?userid=5987.
If it is a REQEST, I can get useid = request.GET['userid']. But in POST, I could not get the variable from the POST, I could not even find the variable in POST, the following check userid in request.POST was false, and I cannot check if the syntax of next statement "userid = request.POST.get("userid", "")" is correct or not.
if userid in request.POST
userid = request.POST.get("userid", "")
Also, at the moment, I made a hard coded absolutely URL in the submit action:
<form method="post" action="http://myhost.com/user/?userid={{ request.user_id }}">{% csrf_token %}
Is there a key word for current URL I can put it in the action, for example, like action = "{{ current_url }}/?userid={{ request.user_id }}"?