1
0

vault backup: 2025-12-26 02:09:22
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 2m29s

This commit is contained in:
2025-12-26 02:09:22 +01:00
parent 3fddadfe50
commit 50366b9b9c
288 changed files with 58893 additions and 750 deletions

23
stroma/quiz/apps.py Normal file
View File

@@ -0,0 +1,23 @@
import os
import sys
from django.apps import AppConfig
class QuizAppConfig(AppConfig):
name = 'quiz'
default_auto_field = 'django.db.models.BigAutoField'
def ready(self):
"""
App initialization code.
Starts the auto-import watcher in a background thread.
"""
# Only run in the main process (not in reloader process)
# And not during management commands or pytest tests
is_management_command = any(cmd in sys.argv for cmd in ['import_questions', 'migrate', 'makemigrations', 'shell'])
is_pytest = 'pytest' in sys.argv[0] or 'PYTEST_CURRENT_TEST' in os.environ
if not is_management_command and not is_pytest and (os.environ.get('RUN_MAIN') == 'true' or os.environ.get('RUN_MAIN') is None):
from quiz.utils.watcher import start_watcher_thread
start_watcher_thread()