Species.vpc_raw (JSONField) stores the full scrape payload at import time. vpc_species_reset view restores bloom_months, sunlight, max_height_cm etc. from that snapshot. If vpc_raw is missing (species imported before this feature), it re-scrapes from VPC on demand and saves the result. Reset button appears on plant detail page for any plant with a VPC species. A 'next' hidden field returns the user to the same plant after reset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
342 B
Python
16 lines
342 B
Python
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('plants', '0005_species_vpc_slug'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='species',
|
|
name='vpc_raw',
|
|
field=models.JSONField(blank=True, null=True),
|
|
),
|
|
]
|