I suggest creating a profile, leave the auth.User only for auth, all else
specific to you application use your own model and reference to that


On Tue, Jul 18, 2017 at 9:48 AM, 李余通 <liyutong19961...@gmail.com> wrote:

> How to extend User?I find many ways;
> 1. Use Profile
> eg:
>
> class UserProfile(models.Model):
>     user = models.OneToOneField(User)
>     major = models.TextField(default='', blank=True)
>
> This way is easy to understand,However,it will create a new table in sql,I 
> heard this will add System burden.
>
> 2.inherit User
> eg:class CustomUser(User):
>     timezone = models.CharField(max_length=50, default='Asia/shanghai')
>     objects = UserManager()
>
> This way seems also will add a new table.
>
> There also have some way but i don't understand,so I want know on Django 
> 1.11,What way is best to extend User?
>
> --
> 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/ee6c8e4a-5f0a-4d20-9855-6c4af4792ff8%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ee6c8e4a-5f0a-4d20-9855-6c4af4792ff8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CAFWa6tLyNh%3DHdYzkrqXYKHgFTbPYwW9ma3qQ6qAP9oKrZESfSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to