[Answered ]-Django Chat App – Capturing value from URL

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>

Leave a comment