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.
DjangoBlog/djangoblog/apps.py

14 lines
514 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.

#gq:
from django.apps import AppConfig
class DjangoblogAppConfig(AppConfig):
# 默认主键类型BigAutoField自增 BigInteger避免ID溢出
default_auto_field = 'django.db.models.BigAutoField'
# 应用唯一标识与settings.py中INSTALLED_APPS配置一致
name = 'djangoblog'
def ready(self):
super().ready() # 执行父类启动逻辑
# 应用启动时自动加载所有插件
from .plugin_manage.loader import load_plugins
load_plugins()