I have an authentication system based on django auth, but I have to add information to users. What is the best way to do that in django 1.5? (In 1.4 i was using a profile linked with onetoone to user, but now?)
Django 1.5 has extendable User models. Basically, you can extend an abstract base user model, add your fields and anything and use it from there.
The base model only has the basics for authentication – the password field and a field for the time of the last login. You even have to create your own username field. If you're comfortable with something like current Django User model (with username, first name, last name, etc.), it also exists as AbstractUser
and you can extend it instead of AbstractBaseUser
and add your own fields.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With