Does django take SCRIPT_NAME into account when using the default LOGIN_URL
Posted
by DanJ
on Stack Overflow
See other posts from Stack Overflow
or by DanJ
Published on 2010-04-25T17:20:14Z
Indexed on
2010/04/25
17:23 UTC
Read the original article
Hit count: 220
django
Hi,
I'm using Django 1.0.2 and trying to figure out how to get the @login_required working correctly.
When I use the built-in server it redirects to the default login_url, or my LOGIN_URL as defined in settings.py as expected.
What is not clear to me is how to deploy to the server where my site is not at the root. In my templates I use the url template tag, and in the views I can access request.META['SCRIPT_NAME'], but for some reason it doesn't seem to apply to the LOGIN_URL used.
What am I missing?
Thanks.
© Stack Overflow or respective owner