2👍
✅
Change order of following two lines. (also prepend ^
in front of crm/
.)
url(r'^crm/',RedirectView.as_view(url='/crm/accounts/login'), name='home'),
url(r'^crm/accounts/', include('accounts.urls')),
Or, change crm/
to ^crm/$
to make it only match crm/
, not /crm/accounts/...
.
url(r'^crm/$',RedirectView.as_view(url='/crm/accounts/login'), name='home'),
url(r'^crm/accounts/', include('accounts.urls')),
Othersie, access to /crm/accounts/login
, /crm/accounts/logout
is handled by RedirectView.as_view(url='/crm/accounts/login')
because the first url pattern matched first is used.
Source:stackexchange.com