Commit graph

5 commits

Author SHA1 Message Date
f594105311 feat: import VPC plant by pasting URL directly in search
slug_from_query() detects VPC URLs and bare slugs (must contain a hyphen
to avoid treating single search words as slugs). When matched, the search
bypasses the keyword search and shows the plant directly as a VPC result.
Updated search hint text to make this discoverable.

Fixes: VPC search by English name (e.g. "crowfoot") is a VPC limitation —
their search only indexes Latin titles, not custom fields like Engelse naam.
The URL paste workflow is the reliable workaround.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 20:20:06 +02:00
a48ee9e73d fix: VPC image scraping and show species name on plant edit
- vpc.py: target .wp-caption img for hero image (VPC uses Elementor, not
  standard WooCommerce gallery); skip logo and placeholder images by URL pattern
- plant_edit view: pass plant.species as 'species' so the species info
  banner (including scientific name) appears on the edit form

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 18:55:16 +02:00
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
40e3419160 fix: surface Perenual API errors instead of silently returning no results
Timeout and rate-limit failures now show a warning message to the user.
Timeout increased to 10s.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 10:37:30 +02:00
a6c3c683d4 feat: add Perenual API service with error fallback 2026-05-28 09:49:32 +02:00