{{{
from django.urls import path, include
from .apps import UsersConfig
app_name = UsersConfig.name
urlpatterns = [
path('accounts/', include("django.contrib.auth.urls")),
]
}}}
The success_url fails to redirect to the correct url since they are more
or less defined in a static manner.
By making a few changes in the auth/views.py file, this issue can be
fixed. One additional change, that needs to be done by the developer, is
to define the app name in the settings.py file separately(Just like
LOGIN_REDIRECT_URL). For Example:
{{{
LOGIN_REDIRECT_URL = 'onboarding'
LOGOUT_REDIRECT_URL = "onboarding"
AUTH_APPLICATION_NAMESPACE = 'users'
}}}
'users' is the name of my app as defined in the former code snippet.
--
Ticket URL: <https://code.djangoproject.com/ticket/33376>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: assigned => closed
* type: Cleanup/optimization => New feature
* resolution: => duplicate
Comment:
Duplicate of #32349.
--
Ticket URL: <https://code.djangoproject.com/ticket/33376#comment:1>
* has_patch: 0 => 1
* type: New feature => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/33376#comment:2>
* status: closed => new
* resolution: duplicate =>
--
Ticket URL: <https://code.djangoproject.com/ticket/33376#comment:3>
* cc: Yash Pathak (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/33376#comment:4>
* status: new => closed
* resolution: => duplicate
Comment:
Please don't reopen closed ticket. This is a duplicate, you can add a
comment to the original ticket, however creating a new setting is always
controversial. You can raise the idea on the DevelopersMailingList to
reach a wider audience and see what other think, but I don't think there
would be consensus to add that complexity.
--
Ticket URL: <https://code.djangoproject.com/ticket/33376#comment:5>