1 2 3 4 5 | from django.http import HttpResponseRedirect
urlpatterns += patterns('',
(r'^my_url$', lambda r: HttpResponseRedirect('http://www.google.com'))
)
|
More like this
- Internet Explorer Redirect Decorator by johnboxall 3 years, 3 months ago
- django redirects middleware a bit more fleixble by robertrv 2 years, 3 months ago
- HttpResponseRedirectView - Redirect to a view by adamlofts 3 years, 5 months ago
- View Redirect Decorators by bryanpieper 1 year, 7 months ago
- RedirectAnywhere by ayeowch 7 months, 2 weeks ago
Comments
Why not just use django.views.generic.simple.redirect_to?
#
I wasn't aware of redirect_to which works equally well.
Having said that: the method above is a little more pleasing colour-wise in my editor and perhaps more intuitive?
#