Skip to content

Commit

Permalink
Merge pull request #84 from giovannicimolin/giovanni/django32-support
Browse files Browse the repository at this point in the history
Upgrade to Django 3.2 and fix warnings
  • Loading branch information
rsinger86 authored Oct 6, 2021
2 parents 573d301 + 39d2468 commit b69d64f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ asgiref==3.4.1
attrs==19.1.0
black==19.3b0
Click==7.0
Django==3.1.13
Django==3.2
djangorestframework==3.12.1
entrypoints==0.3
flake8==3.7.7
Expand Down
6 changes: 6 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@


REST_FLEX_FIELDS = {"EXPAND_PARAM": "expand"}

# In Django 3.2 and onwards, the primary keys are generated using `BigAutoField` instead
# of `AutoField`. To avoid introducing migrations and silence the configuration warnings,
# we're setting this to `AutoField`, which is ok for this use case (tests).
# Reference: https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
2 changes: 1 addition & 1 deletion tests/testapp/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class TestappConfig(AppConfig):
name = 'testapp'
name = 'tests.testapp'

0 comments on commit b69d64f

Please sign in to comment.