Comments (7)
I've thought about this a lot, and I think the only way forward is to finally just give up on using Django's UserCreationForm
.
That's a backwards-incompatible change, so I can't do it immediately, but once I get a release out for official Django 4.2 compatibility I'll start on a major version bump branch that will ship its own base form that doesn't hard-wire in the default Django User
model.
from django-registration.
I need to think about this one.
from django-registration.
I was able to work around this by setting my EmailField
to be named username
. This wasn't too difficult since I'm trying to incorporate Django-Registration into a new project that hasn't been deployed yet, but I imagine it would be more difficult for established sites to do this.
from django-registration.
The thing that's worrying me here is that there's no such thing as a truly generic user-registration view/form for Django. The amount of stuff you can do in a custom user model just makes it impossible to write a single form that can handle anything someone might do. And the documentation on using a custom user model with django-registration already makes clear that there are times when you're going to have to write your own stuff rather than be able to use simple subclasses of the built-in forms/views.
So I'm leaning toward just doing a better job of documenting what django-registration can support, and maybe better documentation of what you need to do when your user model gets too different from that.
from django-registration.
I think a big problem with this issue is that the errors occur on import time. As it is structured now, not only do I have to write my own form, but I can't use the RegistrationView (because I can't import it) nor the URLs (because those import the RegistrationView as well). It would be nice if these errors could be deferred in some way to when the impacted classes are instantiated or something similar.
from django-registration.
Why not use get_user_model
in the RegistrationForm? I just submitted a PR for that but don't know if I'm missing a case where not using Django's default might break someone's code.
from django-registration.
Yeah, the issue is that UserCreationForm
has defaulted to the built-in User
forever, and I don't even know how much stuff depends on it.
If it's going to change, it'll have to change in a major version bump. I'm thinking through whether I want to do that to cover this case, since it's one that comes up but not super often, and the case of differing significantly from Django's built-in model is already one that has a lot of warnings in the docs.
from django-registration.
Related Issues (20)
- wrong path to include in my site URL configuration. HOT 1
- Best way to resend activation email
- List URL names defined for one-step workflow in quickstart
- django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy() HOT 1
- ACCOUNT_ACTIVATION_DAYS not an int HOT 1
- Translation for "Password" does not work HOT 1
- invalid token and site not found
- Is there a function to change email address? HOT 1
- i18n translation doesn't work. HOT 2
- Support for Django 3.2 HOT 2
- Usage with a proxy model to a custom user class. HOT 2
- ``RegistrationView`` only supports ``ModelForm`` but not conventional forms HOT 1
- Missing documentation on removal of `cleanupregistration` HOT 1
- Migration from 2.x to 3.x leaves `registration` table in database HOT 5
- False ImproperlyConfigured error HOT 2
- E-mail field checked twice for correct format HOT 11
- No rendering in email template HOT 2
- Undocumented assumption about custom user models HOT 1
- Two-step `ActivationView` runs `activate()` on HTTP GET HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-registration.