Refactor Django project files to improve type hinting and code clarity

This commit is contained in:
Joakim Hellsén 2025-07-08 01:47:39 +02:00
commit 11c3db9817
6 changed files with 80 additions and 94 deletions

View file

@ -1,16 +1,13 @@
"""
WSGI config for config project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
"""
from __future__ import annotations
import os
from typing import TYPE_CHECKING
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
if TYPE_CHECKING:
from django.core.handlers.wsgi import WSGIHandler
application = get_wsgi_application()
os.environ.setdefault(key="DJANGO_SETTINGS_MODULE", value="config.settings")
application: WSGIHandler = get_wsgi_application()