Skip to content

Commit

Permalink
fix(django): Set default_auto_field to 'AutoField'
Browse files Browse the repository at this point in the history
This will avoid warnings in Django 3.2 and will avoid the creation of
new migrations.
  • Loading branch information
Flimm committed Apr 8, 2021
1 parent 3533862 commit 3c1f7fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Backwards incompatible changes
been renamed to ``certificate_key``. This is done to prevent the key from being displayed
without being masked in Django debug pages.

0.44.0
******

- Better compatibility with Django 3.2


0.43.0 (2020-10-15)
*******************
Expand Down
1 change: 1 addition & 0 deletions allauth/account/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
class AccountConfig(AppConfig):
name = "allauth.account"
verbose_name = _("Accounts")
default_auto_field = 'django.db.models.AutoField'
1 change: 1 addition & 0 deletions allauth/socialaccount/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
class SocialAccountConfig(AppConfig):
name = "allauth.socialaccount"
verbose_name = _("Social Accounts")
default_auto_field = 'django.db.models.AutoField'
1 change: 1 addition & 0 deletions example/example/demo/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def setup_dummy_social_apps(sender, **kwargs):
class DemoConfig(AppConfig):
name = 'example.demo'
verbose_name = _('Demo')
default_auto_field = 'django.db.models.AutoField'

def ready(self):
post_migrate.connect(setup_dummy_social_apps, sender=self)

0 comments on commit 3c1f7fe

Please sign in to comment.