How to customize django-allauth urls

599 Views Asked by At

I want to change the default django-allauth urls with my custom one, for example: Instead of accessing /accounts/login I want to acces login page: /mylogin. I tried to modify urls.py but it doesn't have a complete result.

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

from allauth.account.views import LoginView, SignupView 

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('users.urls')),
    path('accounts/', include('allauth.urls')),

    path('mylogin/', LoginView.as_view(), name='custom_login'),
    path('myregister/', SignupView.as_view(), name='custom_reg'),
]
0

There are 0 best solutions below