[Django]-.Stay on SSL across redirects

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/")
👤anksos

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!

Leave a comment