hotpocket/services/backend/hotpocket_backend/apps/bot/apps.py
Tomek Wójcik b4338e2769
Some checks failed
CI / Checks (push) Failing after 13m2s
Release v1.0.0
2025-08-20 21:00:50 +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