2018-10-04 11:36:11 +00:00
|
|
|
from django.apps import AppConfig
|
2018-10-10 22:43:50 +00:00
|
|
|
import os
|
2018-10-04 11:36:11 +00:00
|
|
|
|
|
|
|
|
2018-10-08 00:01:35 +00:00
|
|
|
class YtManagerAppConfig(AppConfig):
|
2018-10-04 11:36:11 +00:00
|
|
|
name = 'YtManagerApp'
|
2018-10-08 00:01:35 +00:00
|
|
|
|
|
|
|
def ready(self):
|
2018-10-10 22:43:50 +00:00
|
|
|
# There seems to be a problem related to the auto-reload functionality where ready() is called twice
|
|
|
|
# (in different processes). This seems like a good enough workaround (other than --noreload).
|
|
|
|
if not os.getenv('RUN_MAIN', False):
|
|
|
|
from .appmain import main
|
|
|
|
main()
|