carlxaeron / django-rosetta

Automatically exported from code.google.com/p/django-rosetta
MIT License
0 stars 0 forks source link

Remove cleverness around LOGIN_URL #96

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
resolve(settings.LOGIN_URL) is incorrect. resolve() expects to be passed just 
PATH_INFO part of a URL, however, LOGIN_URL should include the script name. Eg, 
when FORCE_SCRIPTNAME = "/foo", LOGIN_URL would be "/foo/login/", which 
resolve() cannot handle - it would expect "/login/". See:

http://code.djangoproject.com/browser/django/trunk/django/core/handlers/base.py?
rev=15226#L100

It's possible to try and account for FORCE_SCRIPT_NAME, but the better solution 
is just to use settings.LOGIN_URL and let the normal Django exception happen if 
it's incorrectly defined.

Original issue reported on code.google.com by akgo...@gmail.com on 20 Jan 2011 at 4:44

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r111.

Original comment by mbonetti on 3 Feb 2011 at 9:58

GoogleCodeExporter commented 8 years ago
That made perfect sense, thanks for the analysis. Fixed in r111.

Original comment by mbonetti on 3 Feb 2011 at 9:59