1 2 3 4 5 6 7 8 | from django.conf.urls.defaults import *
from django.http import HttpResponsePermanentRedirect
def redirect(url):
def inner(request, **args):
redirect_to = '%s?%s' % (url % args, request.GET.urlencode())
return HttpResponsePermanentRedirect(redirect_to)
return inner
|
More like this
- django redirects middleware a bit more fleixble by robertrv 2 years, 7 months ago
- Simple Age Verification Middleware by eculver 2 years, 9 months ago
- SSL Redirect Middleware by zbyte64 3 years, 10 months ago
- Effective content caching for mass-load site using redirect feature by nnseva 10 months, 3 weeks ago
- A action decorator for URLs by Batiste 4 years, 1 month ago
Comments