mgrouchy / django-stronghold

Get inside your stronghold and make all your Django views default login_required
http://mikegrouchy.com/django-stronghold
MIT License
396 stars 47 forks source link

Incorrect handling for LOGOUT_URL #54

Open SunilMohanAdapa opened 8 years ago

SunilMohanAdapa commented 8 years ago

Django's LOGIN_URL etc. settings can be absolute paths or named URLs. In stronghold, LOGOUT_URL is always treated as an absolute path. If someone provides a LOGOUT_URL value as user:logout. It gets translated to regular expression such ^user:logout$ to be matched against request.path_info.

Django itself handles these URLs with django.shortcuts.resolve_url which resolves both named URLs and absolute paths properly.