Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reverse for account_login not found in Django

I'm trying o add to my Django project a registration view from the django-allauth package.

I added the view to my urls.py file but i keep getting the following error:

Reverse for 'account_login' not found. 'account_login' is not a valid view function or pattern name.

Here is how i added the view to my urls:

from allauth.account.views import SignupView

urlpatterns = [
    path("signup/", SignupView.as_view(), name="account_signup"),
]

I don't really understand what am i missing when importing the view, can anyone help me?

like image 444
Jack022 Avatar asked Oct 15 '25 02:10

Jack022


1 Answers

It looks like you need to include the following pattern in urls.py

url(r'^accounts/', include('allauth.urls')),
like image 139
NS0 Avatar answered Oct 19 '25 15:10

NS0



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!