I am using Django 1.0.2 and trying to figure out how to get @login_required to work properly.
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.
Itβs not clear to me how to deploy a 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?
Thank.
source
share