from django.apps import AppConfig

#zhq: 博客应用配置类 - 继承自Django的AppConfig基类
class BlogConfig(AppConfig):
    name = 'blog' #zhq: 应用名称，对应INSTALLED_APPS中的名称
    default_auto_field = 'django.db.models.BigAutoField'

    def ready(self):
        """
        应用启动时执行的初始化操作
        导入所有Admin模块以确保它们被注册
        """
        # 导入Admin模块以触发注册
        try:
            from blog import admin_version  # noqa
            from blog import admin_draft  # noqa
            from blog import admin_social  # noqa
            from blog import admin_media  # noqa
        except ImportError:
            pass
