Per the docs for Django 1.5, I have attempted to broaden the range of data held in the default user model by making an extended user model with the AbstractUser class. I made the model (called "Client") and listed it in settings.py as the AUTH_USER_MODEL. Syncdb took it and it worked great. Specifically, syncdb made a new MySQL table with all the default user fields AND my own additional fields, followed by two related tables for user permissions. I was pretty excited about all this until I tried to authenticate a user. Apparently, the built-in authenticate method is still pointing at the built-in user model. How can I point that method to my new custom model instead?
Fyi, I created new users in the Client model through the djangoized python shell and used set_password to create the passwords. I checked the MySQL tables to verify that my new user records in my Client table looked just like a new user in the built-in user table (auth-user). They did. But they won't authenticate. To double-check, I then made a new user in the built-in user model and it authenticated just fine. I've read about coding custom authentication with a totally customized user model--it looks quite involved and that really shouldn't be necessary for what I'm doing, because my model isn't custom. I've simply extended the existing user model and wish to authenticate users based on that model. There has to be an easier way. Any advice? Thanks! -- 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 http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.