Skip to content

Commit 045eafa

Browse files
authored
Explicit default_auto_field. (#326)
This is configurable since Django 3.2, which is already the required version for oscar-api. see: https://docs.djangoproject.com/en/3.2/topics/db/models/#automatic-primary-key-fields Explicitly telling which field to use if good, it avoids a supious migration like: $ ./manage.py makemigrations Migrations for 'oscarapi': /home/mdk/src/django-oscar/.venv/lib/python3.11/site-packages/oscarapi/migrations/0002_alter_apikey_id.py - Alter field id on apikey notice the migration is created in the venv, in oscarapi tree, not in the user project, it won't work anyway.
1 parent 965c782 commit 045eafa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

oscarapi/apps.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
class OscarAPIConfig(AppConfig):
55
name = "oscarapi"
6+
default_auto_field = "django.db.models.AutoField"

0 commit comments

Comments
 (0)