hotpocket/services/backend/hotpocket_backend/apps/bot/apps.py
Tomek Wójcik d909391ee6
Some checks failed
CI / Checks (push) Has been cancelled
Release v1.0.0rc1
2025-08-18 07:09:27 +02:00

23 lines
671 B
Python

# -*- 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