I did do:
#if form.save():
success = form.errors['success']
On Tue, Jun 26, 2012 at 2:35 PM, Sithembewena Lloyd Dube
<[email protected]>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 here
> if 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
> <[email protected]>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 [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> 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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.