Customising django user model

2019-05-19 Thread Sipum
Hello Friends,

I want to customise django default user table and which should consist of 
name,phone, email and gender.
And after that when every time a user logs in, he/she should able to log in 
through an OTP to phone or email.

can anyone guide me  What to do here.??

Thanks.
Sipum

-- 
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+unsubscr...@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/9b92fdc5-8f36-45e7-809e-b32d4ab41687%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Customising django user model

2019-05-20 Thread Rafael E. Ferrero
Hello, you must to extend User model... search on google with this
aproach!!

Cheers!

Rafael E. Ferrero


El dom., 19 may. 2019 a las 14:13, Sipum () escribió:

> Hello Friends,
>
> I want to customise django default user table and which should consist of
> name,phone, email and gender.
> And after that when every time a user logs in, he/she should able to log
> in through an OTP to phone or email.
>
> can anyone guide me  What to do here.??
>
> Thanks.
> Sipum
>
> --
> 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+unsubscr...@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/9b92fdc5-8f36-45e7-809e-b32d4ab41687%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CAJJc_8XYD7zGAOmaezmS_sGoDr5R0gz1Y44y6ED-sn-dxzj02A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Customising django user model

2019-05-20 Thread Sipum Mishra
Ok thanks for reply.

On Mon, 20 May, 2019, 5:36 PM Rafael E. Ferrero, 
wrote:

> Hello, you must to extend User model... search on google with this
> aproach!!
>
> Cheers!
>
> Rafael E. Ferrero
>
>
> El dom., 19 may. 2019 a las 14:13, Sipum () escribió:
>
>> Hello Friends,
>>
>> I want to customise django default user table and which should consist of
>> name,phone, email and gender.
>> And after that when every time a user logs in, he/she should able to log
>> in through an OTP to phone or email.
>>
>> can anyone guide me  What to do here.??
>>
>> Thanks.
>> Sipum
>>
>> --
>> 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+unsubscr...@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/9b92fdc5-8f36-45e7-809e-b32d4ab41687%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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+unsubscr...@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/CAJJc_8XYD7zGAOmaezmS_sGoDr5R0gz1Y44y6ED-sn-dxzj02A%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CAGHZBzyygP31OdejPiNn7V_KtYprD5kfswBeJMbD1y2zesmuOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Customising django user model

2019-05-20 Thread Joe Reitman
You can customize the user table by extending AbstractUser and add the 
fields you want to add (gender, phone)

I have a custom user example adding age field:

from django.db import models
from django.contrib.auth.models import AbstractUser

class CustomUser(AbstractUser):
   age = models.PositiveIntegerField(null=True, blank=True) 


On Sunday, May 19, 2019 at 12:13:08 PM UTC-5, Sipum wrote:
>
> Hello Friends,
>
> I want to customise django default user table and which should consist of 
> name,phone, email and gender.
> And after that when every time a user logs in, he/she should able to log 
> in through an OTP to phone or email.
>
> can anyone guide me  What to do here.??
>
> Thanks.
> Sipum
>

-- 
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+unsubscr...@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/24afe883-98b9-4bfc-a9fe-284c7a6cb771%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Customising django user model

2019-05-20 Thread mahesh boini
Extend AbstractUser class and give that name in settings file like
AUTH_USER_MODEL=‘appname.modelname’

On Tue, 21 May 2019 at 05:51, Joe Reitman  wrote:

> You can customize the user table by extending AbstractUser and add the
> fields you want to add (gender, phone)
>
> I have a custom user example adding age field:
>
> from django.db import models
> from django.contrib.auth.models import AbstractUser
>
> class CustomUser(AbstractUser):
>age = models.PositiveIntegerField(null=True, blank=True)
>
>
> On Sunday, May 19, 2019 at 12:13:08 PM UTC-5, Sipum wrote:
>>
>> Hello Friends,
>>
>> I want to customise django default user table and which should consist of
>> name,phone, email and gender.
>> And after that when every time a user logs in, he/she should able to log
>> in through an OTP to phone or email.
>>
>> can anyone guide me  What to do here.??
>>
>> Thanks.
>> Sipum
>>
> --
> 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+unsubscr...@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/24afe883-98b9-4bfc-a9fe-284c7a6cb771%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CANR2ZjviAk_hCz%2BVum2kUa7vo6SJP8ZCuOsg0cH9uLncL_mDBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Customising django user model

2019-05-20 Thread Sipum Mishra
Thanks a lot.. @Joe @Mahes
It will help me a lot.

On Tue, 21 May, 2019, 8:14 AM mahesh boini, 
wrote:

> Extend AbstractUser class and give that name in settings file like
> AUTH_USER_MODEL=‘appname.modelname’
>
> On Tue, 21 May 2019 at 05:51, Joe Reitman  wrote:
>
>> You can customize the user table by extending AbstractUser and add the
>> fields you want to add (gender, phone)
>>
>> I have a custom user example adding age field:
>>
>> from django.db import models
>> from django.contrib.auth.models import AbstractUser
>>
>> class CustomUser(AbstractUser):
>>age = models.PositiveIntegerField(null=True, blank=True)
>>
>>
>> On Sunday, May 19, 2019 at 12:13:08 PM UTC-5, Sipum wrote:
>>>
>>> Hello Friends,
>>>
>>> I want to customise django default user table and which should consist
>>> of name,phone, email and gender.
>>> And after that when every time a user logs in, he/she should able to log
>>> in through an OTP to phone or email.
>>>
>>> can anyone guide me  What to do here.??
>>>
>>> Thanks.
>>> Sipum
>>>
>> --
>> 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+unsubscr...@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/24afe883-98b9-4bfc-a9fe-284c7a6cb771%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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+unsubscr...@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/CANR2ZjviAk_hCz%2BVum2kUa7vo6SJP8ZCuOsg0cH9uLncL_mDBQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CAGHZBzzNHg4-Xkn5aGVRpttxBZooKy1DSS_SGNU5gbUdW7FCYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Customising django user model

2019-05-22 Thread אורי
Hi Sipum,

We did it on Speedy Net and you can see our models and settings there:

https://github.com/speedy-net/speedy-net
https://github.com/speedy-net/speedy-net/blob/master/speedy/core/accounts/models.py#L160
https://github.com/speedy-net/speedy-net/blob/master/speedy/core/settings/base_with_login.py#L26


אורי
u...@speedy.net


On Sun, May 19, 2019 at 8:13 PM Sipum  wrote:

> Hello Friends,
>
> I want to customise django default user table and which should consist of
> name,phone, email and gender.
> And after that when every time a user logs in, he/she should able to log
> in through an OTP to phone or email.
>
> can anyone guide me  What to do here.??
>
> Thanks.
> Sipum
>
> --
> 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+unsubscr...@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/9b92fdc5-8f36-45e7-809e-b32d4ab41687%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CABD5YeFBbZ%3Df2xPYNWZY%3D_FHWGK0eUeDm9W8NDonKTOT1DVWhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.