Hi!
I am migrating django from 2.2 to 4.1.3.
As part of it, I am replacing re_path
with path
.
path('', temporary_redirect(redirect_to='/accounts/login/'), name='root'),
re_path(r'^accounts/',
MyTemplateView.as_view(
template_name='auth/index.html',
extra_context=settings.DEFAULT_CONTEXT
),
name='authentication'
),
I changed the above to:
path('', temporary_redirect(redirect_to='/accounts/login/'), name='root'),
path('accounts/',
MyTemplateView.as_view(
template_name='auth/index.html',
extra_context=settings.DEFAULT_CONTEXT
),
name='authentication'
),
And it just does not work. When I try to visit /accounts/login/
page it says not found.
Changing back to re_path as it was just works.
I am not sure what the problem is.
Any thoughts on this?