Re: Adding extra info to HttpResponseRedirect

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 09:50 +, francois wrote: > > > On 3 oct, 18:54, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > http://www.djangoproject.com/documentation/authentication/#messages > > > > Can I use messages with a HttpResponseRedirect? No. This corresponds to an HTTP 302 response

Re: Adding extra info to HttpResponseRedirect

2007-10-04 Thread Samuel Adam
HttpResponseRedirect doesn't return a template so you just need to add your message before the redirect: request.user.message_set.create(message="Your playlist was added successfully.") You should implement the display of your messages on your base template like this: {% for message in messages

Re: Adding extra info to HttpResponseRedirect

2007-10-04 Thread francois
On 3 oct, 18:54, "James Bennett" <[EMAIL PROTECTED]> wrote: > http://www.djangoproject.com/documentation/authentication/#messages > Can I use messages with a HttpResponseRedirect? In the example given I need to give the context_instance but how to do that with HttpResponseRedirect (which

Re: Adding extra info to HttpResponseRedirect

2007-10-03 Thread James Bennett
On 10/3/07, Nabuco <[EMAIL PROTECTED]> wrote: > I have a view which receives a list of items in my app to be deleted. > After the deletion, I need to return a page containing the same origin > page plus a message like "the items (items here) have been > successfully deleted".

Adding extra info to HttpResponseRedirect

2007-10-03 Thread Nabuco
I have a view which receives a list of items in my app to be deleted. After the deletion, I need to return a page containing the same origin page plus a message like "the items (items here) have been successfully deleted". So, after doing all the required stuff in the view, if I want to avoid