Zum Hauptinhalt springen

2025-11-17

Today I learned that when using constants in your application code, which originate from your application settings.py, then you should always go via from django.conf import settings and access your constants lazily via settings.YOUR_CONSTANT and not via direct access from your_app.settings import YOUR_CONSTANT.

If you do this, this can lead import dependencies and re-import/re-starts on startup.