Django - allauth: How to remove allauth login and signup urls

Viewed 669

I am trying to use Django-allauth for some password resetting functionalities, however, I am trying to disable login/signup with django-allauth. So far I have not been able to find a way to either redirect users to my custom signup and login or completely disable those URLs. I was wondering if there is a workaround on how I can remove those URLs?

My current approach was to add all the URLs manually without those, but that is causing an error with my social-login links.

Currently, I have added the following to my URLs:

url(r"^accounts/logout/$", allauth_views.logout, name="account_logout"),
    url(r"^accounts/password/change/$", allauth_views.password_change,name="account_change_password"),
    url(r"^accounts/password/set/$", allauth_views.password_set, name="account_set_password"),
    url(r"^accounts/inactive/$", allauth_views.account_inactive, name="account_inactive"),
    # E-mail
    url(r"^accounts/email/$", allauth_views.email, name="account_email"),
    url(r"^accounts/confirm-email/$", allauth_views.email_verification_sent,name="account_email_verification_sent"),
    url(r"^accounts/confirm-email/(?P<key>[-:\w]+)/$", allauth_views.confirm_email,name="account_confirm_email"),
    # password reset
    url(r"^accounts/password/reset/$", allauth_views.password_reset,name="account_reset_password"),
    url(r"^accounts/password/reset/done/$", allauth_views.password_reset_done,name="account_reset_password_done"),
    url(r"^accounts/password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$",allauth_views.password_reset_from_key,name="account_reset_password_from_key"),
    url(r"^accounts/password/reset/key/done/$", allauth_views.password_reset_from_key_done,name="account_reset_password_from_key_done"),
    # social account
    path('socialaccount/login/cancelled/', allauth_socialviews.login_cancelled,name='socialaccount_login_cancelled'),
    path('socialaccount/login/error/', allauth_socialviews.login_error,name='socialaccount_login_error'),
    path('socialaccount/signup/', allauth_socialviews.signup, name='socialaccount_signup'),
    path('socialaccount/connections/', allauth_socialviews.connections, name='socialaccount_connections'),

However, since I have a Google social login I get an error:

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

How can I implement this without causing any errors?

0 Answers
Related