You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
git-test/apps.py

16 lines
556 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Zxy导入Django的AppConfig模块
from django.apps import AppConfig
# Zxy定义Djangoblog应用的配置类
class DjangoblogAppConfig(AppConfig):
# Zxy设置默认的自动字段类型
default_auto_field = 'django.db.models.BigAutoField'
# Zxy应用名称
name = 'djangoblog'
# Zxy重写ready方法用于初始化应用
def ready(self):
super().ready() # Zxy调用父类的ready方法
# Zxy导入并加载插件
from .plugin_manage.loader import load_plugins
load_plugins() # Zxy加载插件