Hi,

def foo(request):
    ....
    return django.http.HttpResponseRedirect(newlocation)

newlocation can be an URL. I create them with
django.core.urlresolvers.reverse().

  Thomas

nbv4 schrieb:
> If the user goes to /foobar, I want it to redirect him to /foobar-page-
> XX, XX being the last page. I have a this in my urlconf"
>
> (r'^foobar/
> $',
> 'project.main.views.foobar_no_page', ),
> (r'^foobar-page-(?P<page>\d{1,4})/$',
> 'project.main.views.foobar', ),
>
> foobar() in my views in my main function, foobar_no_page() is have set
> as:
>
> def logbook_no_page(request):
>
>       return HttpResponse(location='/foobar-page-55')
>
>
> but that obviously doesn't work. How can I do this?
>
>   


-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to