style: add @require_GET to plant_card view
This commit is contained in:
parent
10a76238aa
commit
a97bb77f32
1 changed files with 2 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from datetime import date
|
||||
from django.shortcuts import render, get_object_or_404, redirect
|
||||
from django.views.decorators.csrf import ensure_csrf_cookie
|
||||
from django.views.decorators.http import require_POST
|
||||
from django.views.decorators.http import require_POST, require_GET
|
||||
from plants.models import Plant, Species, PruningLog, PlantPhoto, PlantCardPhoto
|
||||
from plants.forms import PlantForm, PruningLogForm
|
||||
from plants.utils.pruning import pruning_status
|
||||
|
|
@ -114,6 +114,7 @@ def plant_delete(request, pk):
|
|||
return render(request, 'plants/plant_confirm_delete.html', {'plant': plant})
|
||||
|
||||
|
||||
@require_GET
|
||||
def plant_card(request, pk):
|
||||
plant = get_object_or_404(
|
||||
Plant.objects.prefetch_related('card_photos'), pk=pk
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue