C
C
centrin02016-07-18 08:30:29
Django
centrin0, 2016-07-18 08:30:29

How to properly extend the user class in django?

New project on django 1.9
I'm trying to extend the standard User class and make registration.
The example was taken from here stackoverflow.com/questions/21779226/abstractuser-...
But it didn't work. When registering superuser I get an error.
django.db.utils.IntegrityError: NOT NULL constraint failed
how to make view.py right? I think there is an error.
Can someone throw off an example with inheritance from AbstractUser and a registration form?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2016-07-18
@centrin0

https://devel0per.space/sobstvennaya-model-polzova...

I
IvanOne, 2016-07-18
@IvanOne

If you add required fields, then you should rewrite the create_user and create_superuser methods

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question