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

13 lines
559 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.

from django.apps import AppConfig
class CommentsConfig(AppConfig):
"""
Django应用配置类用于定义"comments"应用的元数据和配置
Django中每个应用都需要通过继承AppConfig类来声明应用信息
该类会在项目启动时被Django自动加载用于初始化应用相关设置
"""
# 应用的唯一标识名称必须与应用目录名一致用于Django识别和管理该应用
# 在settings.py的INSTALLED_APPS中注册时通常使用这个名称如'comments'
name = 'comments'