1👍
What about the generic way for redirection? This couldn’t work?
from django.views.generic.simple import redirect_to
urlpatterns = patterns('',
(r'^one/$', redirect_to, {'url': '/another/'}),
#etc...
)
Also you can use the simplest way:
from django.http import HttpResponseRedirect
def myview(request):
...
return HttpResponseRedirect("/path/")
0👍
Sorry to come back on this old post but I’ve got exactly the same problem.
When I’m go on my swbsite (https://jib.li) over ssl, it redirects it to /home but without ssl…
I’m doing my redirect as suggested:
url(r'^$', redirect_to, {'url': '/home/'})
Thanks!
- [Django]-Unknown command: 'collectstatic' Django 1.7
- [Django]-{{ STATIC_URL }} with pyjade in django
- [Django]-Serving static files for development mode in Django
- [Django]-File transfer between app and media server
Source:stackexchange.com