Comments (5)
I 'fixed' my issue by just blindly deleting the table in the DB:
drop table registration_registrationprofile;
I have no idea of the implications of this though. If it's fine, then this should be added as a migration to django_registration>=3.0
from django-registration.
The problem with adding a migration for this is that some people might want to keep a historical table around with the data, and adding a migration more or less forces that table and all its data to drop at the next run of manage.py migrate
. So I donโt think Iโll be adding a migration to drop that table. Documenting what to do with it in the upgrade notes is a possibility, though.
from django-registration.
Keeping the table around makes sense, but in that case I think the table should decouple itself from the user model table (somehow removing the foreign key requirement on the). Another solution would just be to add an on_delete=models.SET_NULL
for the RegistrationProfile model.
Basically, the issue that I hope we can solve is: if I try to delete a user
after upgrading to django_registration>=3.0
, I should still be able to delete.
from django-registration.
The bigger problem is that as of 3.0, django-registration itself no longer ships any models or migrations at all. Adding them at this point would just introduce confusion for people who have already been on 3.x versions for several years (django-registration 3.0 was released in 2018) and would wonder why there are suddenly migrations. So again, I don't think django-registration will be adding a migration at this point. Installations that run into issues can manually generate their own migration to do what they want with the table -- whether that's dropping it, changing the ON DELETE
behavior, or something else entirely.
from django-registration.
I ultimately 'solved' this problem without deleting the registrationprofile
table by dropping the foreign key requirement:
alter table registration_registrationprofile drop constraint registration_registrationprofile_user_id_fkey;
Perhaps this can be added to the docs?
from django-registration.
Related Issues (20)
- 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
- False ImproperlyConfigured error HOT 2
- Error importing RegistrationView when using custom user model with unique USERNAME_FIELD HOT 8
- E-mail field checked twice for correct format HOT 11
- No rendering in email template HOT 2
- Undocumented assumption about custom user models HOT 2
- Two-step `ActivationView` runs `activate()` on HTTP GET HOT 2
- Python 3.11+ support? HOT 1
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.