#if form.save():
success = form.errors['success']
--
Regards,
Sithembewena Lloyd Dube
-- On Tue, Jun 26, 2012 at 2:35 PM, Sithembewena Lloyd Dube <zebra05@gmail.com> wrote:
@newkedison, thank you for the suggestion. I wish to stay on the page without doing any redirects.@Jirka - thanks. I saw something about the messaging framework and even tried one example which did not work.I ended up doing the following (which worked):In view:success = default value hereif form.is_valid():form.errors['success'] = 'Saved'....return self.render_to_response(request, template_name, {'tomatoes': tomatoes,'success': success,})... and in template:<p>{{ success }}</p>Regards.On Tue, Jun 26, 2012 at 2:20 PM, Jirka Vejrazka <jirka.vejrazka@gmail.com> wrote:
Hi,
have you checked the messaging framework in Django?
HTH
Jirka
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
Regards,
Sithembewena Lloyd Dube
Regards,
Sithembewena Lloyd Dube
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment