Mercurial > public > sg101
changeset 431:0d91176cf9b3
More work on #211. The compose view now returns the tab fragment HTML so errors can be displayed correctly.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 06 May 2011 00:02:55 +0000 |
parents | 9df368d9775d |
children | ca744075e7b7 |
files | gpp/messages/views.py gpp/templates/messages/compose_tab.html |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gpp/messages/views.py Thu May 05 02:58:44 2011 +0000 +++ b/gpp/messages/views.py Fri May 06 00:02:55 2011 +0000 @@ -212,7 +212,7 @@ if compose_form.is_valid(): compose_form.save(parent_msg=parent_msg) messages.success(request, 'Message sent.') - return HttpResponseRedirect(reverse('messages-index_named', args=['compose'])) + compose_form = ComposeForm(request.user) else: if receiver is not None: form_data = {'receiver': receiver}
--- a/gpp/templates/messages/compose_tab.html Thu May 05 02:58:44 2011 +0000 +++ b/gpp/templates/messages/compose_tab.html Fri May 06 00:02:55 2011 +0000 @@ -9,7 +9,7 @@ {% endfor %} </ul> {% endif %} -<form action="{% url 'messages-compose' %}" method="post" id="msg_compose_form">{% csrf_token %} +<form action="." method="post" id="msg_compose_form" onsubmit="return messageSubmit(this);" > <table> {{ compose_form.as_table }} <tr>