Skip to content

Commit 224c7ba

Browse files
committed
chore: add 'default_auto_field' to app config
'default_auto_field' is added to the app config and 'DEFAULT_AUTO_FIELD' to the testapp settings in order to silence warnings from Django.
1 parent da15957 commit 224c7ba

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Maintenance and refactoring
3636
* Renamed 'ObjectsClientConfiguration' to 'ObjectsAPIServiceConfiguration'
3737
as well as the fields for the ZGW client configurations. This is lesss
3838
confusing and captures the intent of the code better.
39+
* Added 'default_auto_field' to app config and 'DEFAULT_AUTO_FIELD' to
40+
testapp settings to silence warnings.
3941

4042

4143
0.4.1 (2025-12-03)

objectsapiclient/apps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
class ObjectsAPIClientConfig(AppConfig):
55
name = "objectsapiclient"
6+
default_auto_field = "django.db.models.AutoField"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 5.2.9 on 2025-12-08 08:50
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("testapp", "0001_initial"),
9+
]
10+
11+
operations = [
12+
migrations.AlterField(
13+
model_name="page",
14+
name="id",
15+
field=models.BigAutoField(
16+
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
17+
),
18+
),
19+
]

testapp/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@
6060

6161
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
6262
MEDIA_URL = "/media/"
63+
64+
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

0 commit comments

Comments
 (0)