Django: Can't login with Allauth

Viewed 107

I tried all login, signup process with usign allauth in Django. But I have this problem:

File "C:\Users\Mircal\Desktop\Project\core\urls.py", line 22, in <module> 
path('accounts/login/', name='account_login'),  
TypeError: _path() missing 1 required positional argument: 'view'

core/urls.py:

from django.contrib import admin
from django.urls import include, path

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/', include('allauth.urls')),
    path('accounts/login/', name='account_login'),
]

I have got apps/accounts/login.py and templates/accounts/login.html

I setup this using https://django-allauth.readthedocs.io/en/latest/overview.html

What can I do for solution?

1 Answers

I believe you don't need the third line path('accounts/login/', name='account_login'), because it is included inside allauth.urls

Moreover, there is a mistake in that line because it misses the view argument before your name argument.

Related