Diagrams: 14 kinds drawn by the app (plane with constructed points, graphs with computed roots/extrema/tangents, number lines with intervals, solids, charts, tables, Venn, mapping, trees, fractions, grids, groups, clock). The catalog is split by topic and only the matching sections go next to a question (200-1073 tokens instead of 1854). parse() repairs slips seen on 96 real book problems: Persian digits in JSON numbers, 2*pi, // comments, bare items, Venn with Persian set names. Measured: 45/48 valid on the second round, 0/8 on plain arithmetic; visual review of 83: 64 right, 3 weak, 16 wrong. Content: 82 new questions so no island has fewer than four; fill_lesson_texts writes Unit.blurb (58) and Lesson.example/steps (590) from verified book problems, never the lesson's own quiz problem. seed_content only fills empty fields, so admin edits survive a deploy. Tedi unlocks at 500 xp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
1.2 KiB
Python
26 lines
1.2 KiB
Python
"""
|
||
همراهِ چهارم: «تدی»، شکلکِ زردِ پیشنمایشِ موبایل (mobile-preview/mascot-pack) که
|
||
حالا در فرانت کنارِ سهیار است و همان شش حالتِ چهره را دارد.
|
||
|
||
امتیازِ باز شدن ۵۰۰ است: همان فاصلهی ۲۰۰تاییِ دلتا (۱۰۰) تا پی (۳۰۰)، به خواستِ صاحبِ
|
||
پروژه (۲۰۲۶-۰۹-۲۸). نام و امتیاز از ادمین قابلِ تغییرند؛ get_or_create است، پس ویرایشِ
|
||
بعدیِ ادمین را برنمیگرداند. فرانت فقط slugِ tedi را به این شکلک نگاشت میکند.
|
||
"""
|
||
from django.db import migrations
|
||
|
||
|
||
def create(apps, schema_editor):
|
||
apps.get_model('progress', 'Character').objects.get_or_create(
|
||
slug='tedi',
|
||
defaults={'name': 'تدی', 'icon': 'tedi', 'unlock_xp': 500, 'order': 4},
|
||
)
|
||
|
||
|
||
def remove(apps, schema_editor):
|
||
apps.get_model('progress', 'Character').objects.filter(slug='tedi').delete()
|
||
|
||
|
||
class Migration(migrations.Migration):
|
||
dependencies = [('progress', '0004_seyar_characters')]
|
||
operations = [migrations.RunPython(create, remove)]
|