1👍
✅
you should pass values in urls in html form like this….
<form id="post-form2" method="POST" action="{% url 'messageroom' room_name username %}">
{% csrf_token %}
<input type="text" name="message" id="message" width="100px" />
<input type="submit" value="Send">
</form>
-------------------------- OR ------------------
<form id="post-form2" method="POST" action="/messageroom/room_name/username/">
{% csrf_token %}
<input type="text" name="message" id="message" width="100px" />
<input type="submit" value="Send">
</form>
Source:stackexchange.com