# HG changeset patch # User Brian Neal # Date 1304640175 0 # Node ID 0d91176cf9b310962715836380e986dfbd664824 # Parent 9df368d9775dd5fde81641a73dc913ff28a26b39 More work on #211. The compose view now returns the tab fragment HTML so errors can be displayed correctly. diff -r 9df368d9775d -r 0d91176cf9b3 gpp/messages/views.py --- 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} diff -r 9df368d9775d -r 0d91176cf9b3 gpp/templates/messages/compose_tab.html --- 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 %} {% endif %} -
{% csrf_token %} + {{ compose_form.as_table }}