rename: Note→Post/Line (dashboard); Recognition→Note (drama); new-post/my-posts to billboard

- dashboard: Note→Post, Item→Line across models, forms, views, API, urls & tests
- new-post (9×3) & my-posts (3×3) applets migrate from dashboard→billboard context; billboard view passes form & recent_posts
- drama: Recognition→Note, related_name notes; billboard URL /recognition/→/my-notes/, set-palette at /note/<slug>/set-palette
- recognition.js→note.js (module Note, data.note key); recognition-page.js→note-page.js; .recog-*→.note-*
- _recognition.scss→_note.scss; BillNotes page header; applet slug billboard-recognition→billboard-notes (My Notes)
- NoteSpec.js replaces RecognitionSpec.js; test_recognition.py→test_applet_my_notes.py
- 4 migrations applied: dashboard 0004, applets 0011+0012, drama 0005; 683 ITs green

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-04-22 22:32:34 -04:00
parent 6d9d3d4f54
commit 473e6bc45a
54 changed files with 1373 additions and 1283 deletions

View File

@@ -0,0 +1,24 @@
from django.db import migrations
def rename_note_applets_to_post(apps, schema_editor):
Applet = apps.get_model('applets', 'Applet')
Applet.objects.filter(slug='new-note').update(slug='new-post', name='New Post', context='billboard')
Applet.objects.filter(slug='my-notes').update(slug='my-posts', name='My Posts', context='billboard')
def reverse_rename_note_applets_to_post(apps, schema_editor):
Applet = apps.get_model('applets', 'Applet')
Applet.objects.filter(slug='new-post').update(slug='new-note', name='New Note', context='dashboard')
Applet.objects.filter(slug='my-posts').update(slug='my-notes', name='My Notes', context='dashboard')
class Migration(migrations.Migration):
dependencies = [
('applets', '0010_recognition_applet'),
]
operations = [
migrations.RunPython(rename_note_applets_to_post, reverse_rename_note_applets_to_post),
]

View File

@@ -0,0 +1,31 @@
from django.db import migrations
def rename_recognition_applet_to_notes(apps, schema_editor):
Applet = apps.get_model('applets', 'Applet')
Applet.objects.filter(slug='billboard-recognition').update(
slug='billboard-notes',
name='My Notes',
)
def reverse_rename_recognition_applet_to_notes(apps, schema_editor):
Applet = apps.get_model('applets', 'Applet')
Applet.objects.filter(slug='billboard-notes').update(
slug='billboard-recognition',
name='Recognition',
)
class Migration(migrations.Migration):
dependencies = [
('applets', '0011_rename_note_applets_to_post'),
]
operations = [
migrations.RunPython(
rename_recognition_applet_to_notes,
reverse_rename_recognition_applet_to_notes,
),
]