1
votes

Hello I am very new to Django, and I am making an app that stores a lot of information about the user. But django's auth app stores only a bit of information about the user. Is there any way I can create my own model "User" and make Django's auth app use this model. Thanks.

3

3 Answers

1
votes

This has been supported since Django 1.5, and is fully covered in the documentation.

Basically, you need to subclass auth.models.AbstractUser, and set the AUTH_USER_MODEL setting to point to your new model.

1
votes

You can solves your problem with UserProfile model. And you can store the user extra information in this with relation of onetone or ForeignKey with unique property field.

Django user profile

1
votes

U can multi-table inheritance the user model

from django.contrib.auth import User

class MyUser(User):
//add ur required fields

Reference for in heritance.