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

12 lines
613 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
# 模块级注释——accounts应用的核心配置类文件
# 继承Django内置的AppConfig用于定义应用的基本元信息
# 是Django识别和加载accounts应用的关键配置
class AccountsConfig(AppConfig):
"""
accounts应用的配置类用于注册应用的核心信息
遵循Django应用配置规范定义应用的唯一标识名称
"""
name = 'accounts' # 应用的唯一标识名称,与应用目录名一致,
# Django通过该名称识别并加载应用关联应用内的模型、视图等组件