From eb0e58c9f4322484280f9e4d2038e055798088be Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 24 May 2021 23:12:01 -0400 Subject: [PATCH] Clear event form on save --- tasks/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/views.py b/tasks/views.py index aaf2547..b3fab07 100644 --- a/tasks/views.py +++ b/tasks/views.py @@ -34,6 +34,7 @@ def taskDetail(request, tool_slug, task_slug): form = EventForm(request.POST, user=request.user, instance=event) if form.is_valid(): form.save() + form = EventForm(user=request.user) else: form = EventForm(request.POST) form.add_error(None, "Not authenticated: please login")