bloombase/plants/urls.py
Stephan Kerkman 7fef359ae0 feat: store VPC raw scrape data and add reset button
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>
2026-05-28 18:49:15 +02:00

20 lines
1.2 KiB
Python

from django.urls import path
from plants.views import dashboard, plants, pruning, species
urlpatterns = [
path('', dashboard.dashboard, name='dashboard'),
path('plants/', plants.plant_list, name='plant_list'),
path('plants/add/', plants.plant_add, name='plant_add'),
path('plants/<int:pk>/', plants.plant_detail, name='plant_detail'),
path('plants/<int:pk>/edit/', plants.plant_edit, name='plant_edit'),
path('plants/<int:pk>/delete/', plants.plant_delete, name='plant_delete'),
path('plants/<int:pk>/log-pruning/', plants.log_pruning, name='log_pruning'),
path('plants/<int:pk>/upload-photo/', plants.upload_photo, name='upload_photo'),
path('photos/<int:photo_pk>/set-thumbnail/', plants.set_thumbnail, name='set_thumbnail'),
path('photos/<int:photo_pk>/delete/', plants.delete_photo, name='delete_photo'),
path('pruning/', pruning.pruning_calendar, name='pruning_calendar'),
path('species/search/', species.species_search, name='species_search'),
path('species/select/', species.species_select, name='species_select'),
path('species/select/vpc/', species.vpc_select, name='vpc_select'),
path('species/<int:species_pk>/reset-vpc/', species.vpc_species_reset, name='vpc_species_reset'),
]