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/0002_alter_comment_is_enabl...

24 lines
693 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.

#zr 数据库迁移文件:修改评论是否显示字段的默认值
# Generated by Django 4.1.7 on 2023-04-24 13:48
from django.db import migrations, models
#zr 数据库迁移类
class Migration(migrations.Migration):
#zr 依赖的迁移文件
dependencies = [
('comments', '0001_initial'),
]
#zr 迁移操作
operations = [
#zr 修改comment模型的is_enable字段
migrations.AlterField(
model_name='comment',
name='is_enable',
#zr 将默认值改为False并更新显示名称
field=models.BooleanField(default=False, verbose_name='是否显示'),
),
]