Refactor test utilities and enhance ASGI settings

- Cleaned up and standardized assertions in ApiTestMixin for API response validation.
- Updated ASGI settings to use os.environ for setting the DJANGO_SETTINGS_MODULE.
- Removed unused imports and improved formatting in settings.py.
- Refactored URL patterns in urls.py for better readability and organization.
- Enhanced view functions in views.py for consistency and clarity.
- Added .flake8 configuration for linting and style enforcement.
- Introduced type stubs for django-environ to improve type checking with Pylance.
This commit is contained in:
pacnpal
2025-08-20 19:51:59 -04:00
parent 69c07d1381
commit 66ed4347a9
230 changed files with 15094 additions and 11578 deletions

View File

@@ -45,7 +45,8 @@ class Migration(migrations.Migration):
name="core_slughi_content_8bbf56_idx",
),
models.Index(
fields=["old_slug"], name="core_slughi_old_slu_aaef7f_idx"
fields=["old_slug"],
name="core_slughi_old_slu_aaef7f_idx",
),
],
},

View File

@@ -71,7 +71,10 @@ class Migration(migrations.Migration):
),
),
("object_id", models.PositiveIntegerField()),
("timestamp", models.DateTimeField(auto_now_add=True, db_index=True)),
(
"timestamp",
models.DateTimeField(auto_now_add=True, db_index=True),
),
("ip_address", models.GenericIPAddressField()),
("user_agent", models.CharField(blank=True, max_length=512)),
(
@@ -86,7 +89,8 @@ class Migration(migrations.Migration):
options={
"indexes": [
models.Index(
fields=["timestamp"], name="core_pagevi_timesta_757ebb_idx"
fields=["timestamp"],
name="core_pagevi_timesta_757ebb_idx",
),
models.Index(
fields=["content_type", "object_id"],