How to make Custom User Registration and Login

98 views
Skip to first unread message

Anubhav Madhav

unread,
May 6, 2020, 6:09:29 AM5/6/20
to Django users
I am new to Django. I need to make a custom sign up and log in page. Because, during Sign Up, I also want to get User's Address and Contact Number. In Django's 'User' module, it isn't supported. So, how can I make a custom sign up and sign in page. Please Help!!

Camilo Garcia

unread,
May 6, 2020, 11:12:10 AM5/6/20
to Django users

Kushal Neupane

unread,
May 6, 2020, 11:17:39 AM5/6/20
to django...@googlegroups.com

Anubhav Madhav

unread,
May 7, 2020, 5:33:08 AM5/7/20
to Django users
Thankyou Camilo!!

Anubhav Madhav

unread,
May 7, 2020, 5:33:25 AM5/7/20
to Django users
Thankyou so much Kushal!!


On Wednesday, 6 May 2020 20:47:39 UTC+5:30, Kushal Neupane wrote:
On Wed, May 6, 2020 at 8:57 PM Camilo Garcia <camilog...@gmail.com> wrote:
This might come in handy https://learndjango.com/tutorials/django-custom-user-model

On Wednesday, May 6, 2020 at 5:09:29 AM UTC-5, Anubhav Madhav wrote:
I am new to Django. I need to make a custom sign up and log in page. Because, during Sign Up, I also want to get User's Address and Contact Number. In Django's 'User' module, it isn't supported. So, how can I make a custom sign up and sign in page. Please Help!!

--
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...@googlegroups.com.

Abhi Mathew

unread,
May 31, 2020, 10:38:05 AM5/31/20
to Django users
I don't how familiar you are with Django but this post will help you anyhow!

sunday honesty

unread,
May 31, 2020, 11:20:20 AM5/31/20
to django...@googlegroups.com
It's better to make a separate app for users. You can call the app users or account. Create a form.py file in your users app. Then create a CustomUser class that inherits from either AbstractUser or AbstractBaseUser (check out the difference between the two). Then you can define the fields you want to use.
Create UserCreationForm subsequently.

Create a folder called registration inside your templates folder and create your login.html there

You must update your settings with
AUTH_USER_MODEL = 'users.CustomUser'

LOGIN_URL = 'login' Note, login here is the name you gave your login url.

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/42f04b63-6d5f-473e-9526-a6fe906ceef8%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages