4 ms·
You can also subclass auth.User, which allows you to maintain compatibility with 3rd party apps. This is how I've gotten around the user name length limitation
by legutierr 14y ago
You can also subclass auth.User, which allows you to maintain compatibility with 3rd party apps.
This is how I've gotten around the user name length limitation. I have a longer field in the subclass, and implement a backend to check that. But because it's a subclass, foreign-key relations still work.
- zeemonkee2 14y agoWhat if you want to get rid of the username field altogether? For example, my typical use case: unique email address for logins, no usernames: I suppose you could subclass User with a longer username, and sync the username with the email address using a signal, for example. Still, it's a chunk of workaround I end up doing one way or another with each new project. Hopefully soon (based on discussions on django-developers group) we'll see some kind of pluggable User model.