Closed simkimsia closed 3 years ago
For those who are looking for workaround while waiting for the PR #224 to be merged, here's the workaround.
GO to your apps.py
in your django project and add this at the end of the file. Do remember to remove it after the PR is merged
from organizations.apps import OrganizationsConfig
class ModifiedOrganizationsConfig(OrganizationsConfig):
default_auto_field = "django.db.models.AutoField"
in your settings.py where you declare your third_party_apps
THIRD_PARTY_APPS = [
...
# "organizations", # you should comment this out and when the PR is merged, uncomment it
"yourproject.apps.ModifiedOrganizationsConfig", # remove this when PR is merged
....
]
LOCAL_APPS = [
"yourprojectapp",
]
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
I was very confused by this:
Django 3.2 introduces DEFAULT_AUTO_FIELD . If you set this to something other than 'django.db.models.AutoField', migrations will need to be generated for allauth's models. This pull request sets default_auto_field just for these apps so that no migrations need to be generated.
But that if that reads "django-organization's models" then it makes a lot more sense!
Thank you @simkimsia!
But that if that reads "django-organization's models" then it makes a lot more sense!
Oh right.. sorry!
@bennylope pls update pypi for a new version if you don't mind. I like to update the dependency so i can stop using the workard i detailed here.
@simkimsia it's live now, thank you again https://pypi.org/project/django-organizations/#history
Django 3.2 introduces DEFAULT_AUTO_FIELD . If you set this to something other than 'django.db.models.AutoField', migrations will need to be generated for django-organization's models. This pull request sets default_auto_field just for these apps so that no migrations need to be generated.
It also hides warnings on Django 3.2.
The specific warning is
Similar in another highly used django library https://github.com/pennersr/django-allauth/pull/2829
EDIT
Change
allauth
todjango-organization