Skip to content

Commit

Permalink
refactor: black
Browse files Browse the repository at this point in the history
  • Loading branch information
lin594 committed Nov 16, 2023
1 parent 4bc0874 commit 4ec744c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,25 @@


class Migration(migrations.Migration):

dependencies = [
('rewards', '0001_initial'),
("rewards", "0001_initial"),
]

operations = [
migrations.AlterModelOptions(
name='order',
options={'verbose_name': '订单', 'verbose_name_plural': '订单'},
name="order",
options={"verbose_name": "订单", "verbose_name_plural": "订单"},
),
migrations.AlterModelOptions(
name='product',
options={'verbose_name': '商品', 'verbose_name_plural': '商品'},
name="product",
options={"verbose_name": "商品", "verbose_name_plural": "商品"},
),
migrations.AlterModelOptions(
name='title',
options={'verbose_name': '头衔', 'verbose_name_plural': '头衔'},
name="title",
options={"verbose_name": "头衔", "verbose_name_plural": "头衔"},
),
migrations.AlterModelOptions(
name='transaction',
options={'verbose_name': '积分记录', 'verbose_name_plural': '积分记录'},
name="transaction",
options={"verbose_name": "积分记录", "verbose_name_plural": "积分记录"},
),
]
59 changes: 41 additions & 18 deletions hinghwa-dict-backend/word/migrations/0006_list_ship.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,60 @@


class Migration(migrations.Migration):

dependencies = [
('word', '0005_list_admin'),
("word", "0005_list_admin"),
]

operations = [
migrations.AlterField(
model_name='list',
name='name',
field=models.CharField(blank=True, max_length=30, verbose_name='词单名称'),
model_name="list",
name="name",
field=models.CharField(blank=True, max_length=30, verbose_name="词单名称"),
),
migrations.CreateModel(
name='ListShip',
name="ListShip",
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('li', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='word.list')),
('word', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='word.word')),
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"li",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="word.list"
),
),
(
"word",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="word.word"
),
),
],
options={
'verbose_name': '包含词',
'verbose_name_plural': '包含词',
'ordering': ['id'],
"verbose_name": "包含词",
"verbose_name_plural": "包含词",
"ordering": ["id"],
},
),
),
migrations.RemoveField(
model_name='list',
name='words',
model_name="list",
name="words",
),
migrations.AddField(
model_name='list',
name='words',
field=models.ManyToManyField(blank=True, related_name='included_word', through='word.ListShip', to='word.Word', verbose_name='词语'),
model_name="list",
name="words",
field=models.ManyToManyField(
blank=True,
related_name="included_word",
through="word.ListShip",
to="word.Word",
verbose_name="词语",
),
),
]

0 comments on commit 4ec744c

Please sign in to comment.