new applet structure for apps.billboard, incl. My Scrolls, Contacts & Most Recent applets; completely revamped _billboard.scss, tho some styling inconsistencies persist; ensured #id_billboard_applets_container inherited base styles found in _applets.scss; a pair of new migrations in apps.applets to support new applet models & fields; billboard gets its first ITs, new urls & views; pair of new FT classes in FTs.test_billboard
This commit is contained in:
29
src/apps/applets/migrations/0007_fix_billboard_applets.py
Normal file
29
src/apps/applets/migrations/0007_fix_billboard_applets.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def fix_billboard_applets(apps, schema_editor):
|
||||
Applet = apps.get_model("applets", "Applet")
|
||||
# billboard-scroll belongs only to the billscroll page template, not the grid
|
||||
Applet.objects.filter(slug="billboard-scroll").delete()
|
||||
# Rename "My Contacts" → "Contacts"
|
||||
Applet.objects.filter(slug="billboard-my-contacts").update(name="Contacts")
|
||||
|
||||
|
||||
def reverse_fix_billboard_applets(apps, schema_editor):
|
||||
Applet = apps.get_model("applets", "Applet")
|
||||
Applet.objects.get_or_create(
|
||||
slug="billboard-scroll",
|
||||
defaults={"name": "Billscroll", "grid_cols": 12, "grid_rows": 6, "context": "billboard"},
|
||||
)
|
||||
Applet.objects.filter(slug="billboard-my-contacts").update(name="My Contacts")
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("applets", "0006_billboard_applets"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(fix_billboard_applets, reverse_fix_billboard_applets),
|
||||
]
|
||||
Reference in New Issue
Block a user