I am using Django-rest-auth (https://github.com/Tivix/django-rest-auth) in my django project for login and registration. I see a default registration form as in attached file.
-- Currently I am being able to register a new user with email instead of username. The default auth_user table in my MySql database has following columns: (id, password,last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined)
My settings.py :
INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'rest_framework', #Rest-auth 'rest_framework.authtoken', 'rest_auth', #Rest-auth registration 'allauth', 'allauth.account', 'rest_auth.registration', #Following is added to allow cross domain requests i.e. for serving requests those are coming from frontend app 'corsheaders', 'flights', )
I want modify my registration form to have first name and last name with above fields so that when I register a new user, those two columns are also populated with first_name & last_name. Currently I have no additional view for registration nor any custom user model, I am simply using API endpoints provided by django-rest-auth.
How can I achieve this?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d44aae09-2e46-468c-b614-ad7ed26ec204%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment