python - django templates not altering form action -


i have url file chat.urls.py:

`urlpatterns = patterns('',     url(r'^message/(?p<username>\w+)/$',views.message,name='message'),     url(r'^message/(?p<username>\w+)/submit/$',views.send_message,name='send_message'),     url(r'^inbox/$',views.inbox,name='inbox'),     url(r'^inbox/(?p<username>\w+)/$', views.inbox_by_user,name='inbox_by_user'), )` 

and message.html template send message form this:

<form action="{% url 'inbox' %}" method="post"> {% csrf_token %} <input type="text" name="text" id="text" value="" /> <label for="message">enter message here</label><br />

<input type="submit" value="send" /> </form>

where substituted working code "url 'inbox'", , no matter substitute form action html source rendered

<form action="/chat/message/[username]/" method="post"...

no matter what. have restarted server, made sure saved changes, , has mind of own it's /chat/message/[username]. when changed url reverse 'inbox' should see chat/inbox based on urls. appreciated,

cody

according information in comment, need {% url 'chat:inbox' %} not {% url 'inbox' %} in form.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -