79072197

Date: 2024-10-09 22:11:44
Score: 0.5
Natty:
Report link

Solved with help of ready() function in apps.py

My solution

class ParserAppConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'parser_app'

    def ready(self):
        from scripts.create_schedules import create_cron_templates

        create_cron_templates()
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: mascai