Thanks Margie, Let me try that first.
Cheers, On Apr 14, 2:12 am, Margie <margierogin...@yahoo.com> wrote: > Not sure if this is what you are looking for, but I use the > notifications app to add some extra info to my html, to alert the user > that there are errors in the form below or to let them know that there > was no error and the form was submitted successfully. > > In view.py: > > request.notifications.create('Invalid data in form', > 'error') # render form again > > In your html: > {% if notifications %} > <ul id="notifications"> > {% for notification in notifications %} > <li class="{{ notification.type }}"> > {{ notification.content }}</li> > {% endfor %} > </ul> > {% endif %} > > If you put this html in your base html (or some html that gets > rendered for every page), then you can just create notifications in > your view.py and they will always get displayed in the next page the > user gets sent to. > > To make this work you need (in settings.py): > MIDDLEWARE_CLASSES = ( > 'notifications.middleware.NotificationMiddleware', > > TEMPLATE_CONTEXT_PROCESSORS = ( > "notifications.context_processors.notifications", > > I believe I downloaded this from:http://code.google.com/p/django-notification/ > > Margie --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---