Add phase 3: comments and cooking mode
- Comments on visible recipes; author and admin may delete; per-user hourly rate limit (COMMENT_RATE_LIMIT_PER_HOUR) - Cooking mode with large text, tick-off checklists, serving scaling and Screen Wake Lock to keep the display on - Serving calculator auto-submits on change - Privacy tests cover comment and cooking-mode URLs Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6f7e4f92ca
commit
9256e94286
+9
-1
@@ -3,7 +3,7 @@ from django.conf import settings
|
||||
from django.db import transaction
|
||||
|
||||
from . import images, parsing
|
||||
from .models import Recipe
|
||||
from .models import Comment, Recipe
|
||||
|
||||
|
||||
class MultipleFileInput(forms.ClearableFileInput):
|
||||
@@ -135,3 +135,11 @@ class SearchForm(forms.Form):
|
||||
|
||||
def ingredient_terms(self):
|
||||
return [t.strip() for t in self.cleaned_data.get("zutat", "").split(",") if t.strip()]
|
||||
|
||||
|
||||
class CommentForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Comment
|
||||
fields = ["text"]
|
||||
widgets = {"text": forms.Textarea(attrs={"rows": 3, "placeholder": "Hast du es nachgekocht? Tipps?", "maxlength": 2000})}
|
||||
labels = {"text": "Kommentar schreiben"}
|
||||
|
||||
Reference in New Issue
Block a user