Tivix / django-rest-auth

This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST (JSON)
www.tivix.com
MIT License
2.4k stars 662 forks source link

What does the registration endpoint call? Looking to create UserProfile #559

Open SHxKM opened 5 years ago

SHxKM commented 5 years ago

so in project/accounts/models.py I have a Member model which has a 1-to-1 relationship to Django's default User model. In issue #58, the following is advised by @mateusz-sikora:

So you need to customize signup form in django-allauth.

See django-allauth documetation (ACCOUNT_SIGNUP_FORM_CLASS) http://django-allauth.readthedocs.org/en/latest/configuration.html

I have the following in my urls.py to allow registration in rest-auth, according to the docs:

urlpatterns = [
    path('auth/login/', LoginViewCustom.as_view(), name='rest_login'),
    path("auth/", include("rest_auth.urls")),
    path("auth/registration/", include('rest_auth.registration.urls')) # relevant line
    ]

However, it doesn't seem like the auth/registration endpoint is calling my custom signup form. I'm completely aware of the new signup-form practice in all-auth and have tried both syntaxes.

So to summarize, it doesn't seem like rest_ath.registration.urls calls all-auth's SignupForm. If so, how can one create a Member object when a User object is created through rest-auth's registration endpoint?