40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
|
|
"""Seed the My Sign (a.k.a. My Significator) applet on billboard.
|
|||
|
|
|
|||
|
|
Sprint 4 of the My Sea roadmap. "Significator" remains the storage-layer
|
|||
|
|
term (User.significator FK, room sig-select) — this billboard surface is
|
|||
|
|
branded "Game Sign". 4×6 (narrow + tall), seeded after all other billboard
|
|||
|
|
applets so it renders at the end of the billboard grid. Shows the user's
|
|||
|
|
saved significator card or a blank state.
|
|||
|
|
"""
|
|||
|
|
from django.db import migrations
|
|||
|
|
|
|||
|
|
|
|||
|
|
def seed(apps, schema_editor):
|
|||
|
|
Applet = apps.get_model("applets", "Applet")
|
|||
|
|
Applet.objects.update_or_create(
|
|||
|
|
slug="my-sign",
|
|||
|
|
defaults={
|
|||
|
|
"name": "Game Sign",
|
|||
|
|
"context": "billboard",
|
|||
|
|
"default_visible": True,
|
|||
|
|
"grid_cols": 4,
|
|||
|
|
"grid_rows": 6,
|
|||
|
|
},
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
|
|||
|
|
def unseed(apps, schema_editor):
|
|||
|
|
Applet = apps.get_model("applets", "Applet")
|
|||
|
|
Applet.objects.filter(slug="my-sign").delete()
|
|||
|
|
|
|||
|
|
|
|||
|
|
class Migration(migrations.Migration):
|
|||
|
|
|
|||
|
|
dependencies = [
|
|||
|
|
("applets", "0008_seed_my_sea_applet"),
|
|||
|
|
]
|
|||
|
|
|
|||
|
|
operations = [
|
|||
|
|
migrations.RunPython(seed, unseed),
|
|||
|
|
]
|