Skip to content

Commit

Permalink
Explicitly set DEFAULT_AUTO_FIELD, to silence warning models.W042 aft…
Browse files Browse the repository at this point in the history
…er Django 3.2
  • Loading branch information
laoumh authored and benadida committed Sep 16, 2024
1 parent dc6aae0 commit 4d4461a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def get_from_env(var, default):
DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True)
DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql'

# explicitly set the default auto-created primary field to silence warning models.W042
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
Expand Down

0 comments on commit 4d4461a

Please sign in to comment.