40👍
✅
You’ve set a namespace for your urls:
app_name = 'account'
You need to use that namespace when reversing urls with reverse
/reverse_lazy
or {% url %}
:
LOGIN_REDIRECT_URL = reverse_lazy('account:dashboard')
LOGIN_URL = reverse_lazy('account:login')
LOGOUT_REDIRECT_URL = reverse_lazy('account:logout')
👤knbk
3👍
Perhaps when specifying {% url ‘appname:views’ %} you specified the wrong appname
For example, like:
wrong - {% url 'accuant:dashboard' %}
right - {% url 'account:dashboard' %}
- [Django]-Determine variable type within django template
- [Django]-Malformed Packet: Django admin nested form can't submit, connection was reset
- [Django]-Images from ImageField in Django don't load in template
Source:stackexchange.com