i would use reverse and redirect to a "success" page

def my_view(request):
    #do stufff
    #save info in session
    return HttpResponseRedirect(reverse('success_url'))

def my_success_view(request):
    #access the session and get the data
    return render_to_response('success.html', locals())


On May 4, 9:35 am, xpanta <xpa...@gmail.com> wrote:
> Hi,
>
> I am new to django, and I have this simple task i need to accomplish.
>
> in views.py there is a function that processes an html form (with POST
> action). This function returns an HttpResponseRedirect object. This
> object gets as parameters the redirect action, like this: return
> HttpResponseRedirect('/city/%s/%s/' % (username,city))
>
> Is there any way to add some extra fields, like a message to display
> to the user? (i.e. "Settings have been saved, successfully!")
>
> hope this makes sense,
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to