Model Change Workflow
When changing Django models in Wies, follow this workflow:
Steps
- •Update model in
wies/core/models.py - •Update dummy_data.json to match new structure
- •Format: Django dumpdata JSON format
- •Include
model,pk, andfieldskeys
- •Do NOT run makemigrations - just mention "migration needed" to the user
- •Update forms in
forms.pyif fields changed - •Update views if business logic affected
- •Run tests with
just testto verify nothing breaks
Dummy Data Format
json
{
"model": "core.modelname",
"pk": 1,
"fields": {
"field_name": "value"
}
}
Checklist
- • Model updated
- • dummy_data.json updated
- • Migration mentioned (not executed)
- • Forms updated (if needed)
- • Views updated (if needed)
- • Tests pass