bloombase/plants/migrations/0005_species_vpc_slug.py
Stephan Kerkman a57415983b feat: VPC species search alongside Perenual
- New plants/services/vpc.py: search VPC (vasteplantencatalogus.nl) by
  keyword and scrape full plant detail on select
- Both searches run in parallel via ThreadPoolExecutor
- species_results partial shows results from both sources with colour-coded
  source badges (green = Perenual, blue = VPC)
- vpc_select view scrapes the detail page on select, creates Species with
  bloom_months, max_height_cm, sunlight from the VPC page
- Species.vpc_slug field (migration 0005) prevents re-importing the same plant
- beautifulsoup4 added to requirements
- Handles VPC unavailability gracefully (empty results, no error shown to user)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 18:44:06 +02:00

16 lines
366 B
Python

from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('plants', '0004_location_plantphoto'),
]
operations = [
migrations.AddField(
model_name='species',
name='vpc_slug',
field=models.CharField(blank=True, db_index=True, max_length=200),
),
]