-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for django >= 4.0 makemigrations #184
Conversation
It's necessary to specify the default_auto_field param in apps.py to inhibit generation of migrations in package
This PR refers to yet well documented issue #182 |
Will be solved only through #133 , I'm afraid. |
Hi @ticosax You don't need an abstract model and cannot force user to extend your. Imagine this use case: The alternative is to migrate your model to BigAutoField and persist in apps.py so the migration is your and mantained in the package meanwile #133 will be well defined. Let me know what you think please Regards |
Hi @ticosax i read all before pull request. The reason for my PR is that the new django >= 4.0 default for new projects is Can we al least imagine a fix for this specific use case? Best regards |
To my knowledge, the better, known today, approach to solve this issue, is captured in #133. |
I'd also advocate for this change, over moving to AbstractModel. We ended up going with a monkey patch of the config class as a solution in the meantime:
For what it's worth, this was also the proposed and accepted fix in some other third-party libraries that encountered the same issue. For example, https://github.com/jazzband/django-invitations/pull/211/files |
Given the current state of the project I agree with merging the PR. Moving to an abstract model doesn't seem worth it. |
@ticosax could we merge? |
Hi @ticosax, |
It's necessary to specify the default_auto_field param in apps.py to inhibit generation of migrations in package