From 423acc7077a00c9e82d4daca188e04f313c2dfb6 Mon Sep 17 00:00:00 2001 From: iou1name Date: Tue, 2 Oct 2018 13:31:58 -0400 Subject: [PATCH] user can add to tags now --- quest/forms.py | 2 +- quest/jinja2/quest/quest_homepage.html | 8 ++++++++ quest/urls.py | 1 + quest/views.py | 22 ++++++++++++++++++++++ set_session/views.py | 2 ++ titivillus/urls.py | 1 - 6 files changed, 34 insertions(+), 2 deletions(-) diff --git a/quest/forms.py b/quest/forms.py index a9f42d7..613bc7d 100644 --- a/quest/forms.py +++ b/quest/forms.py @@ -52,7 +52,7 @@ class EditQuestForm(forms.Form): class QuestForm(forms.ModelForm): """ - The main create_quest form. + The main new quest form. """ class Meta: model = Quest diff --git a/quest/jinja2/quest/quest_homepage.html b/quest/jinja2/quest/quest_homepage.html index 55e19b1..3d473ba 100644 --- a/quest/jinja2/quest/quest_homepage.html +++ b/quest/jinja2/quest/quest_homepage.html @@ -48,6 +48,14 @@

{{ quest.title }}

Tags: {% for tag in quest.tags.names() %}{{ tag }}{% if not loop.last %}, {% endif %}{% endfor %} + {% if request.user == quest.owner %} +
+ {{ csrf_input }} + + + +
+ {% endif %}

Pages