You've already forked hotpocket
This commit is contained in:
22
services/backend/hotpocket_backend/apps/bot/apps.py
Normal file
22
services/backend/hotpocket_backend/apps/bot/apps.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import annotations
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class BotConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
label = 'bot'
|
||||
name = 'hotpocket_backend.apps.bot'
|
||||
verbose_name = _('Bot')
|
||||
|
||||
def ready(self):
|
||||
super().ready()
|
||||
|
||||
try:
|
||||
from hotpocket_backend.apps.bot import conf
|
||||
conf.bot_settings = conf.from_django_settings()
|
||||
except Exception as exception:
|
||||
raise ImproperlyConfigured('Invalid bot settings') from exception
|
||||
Reference in New Issue
Block a user