From d82cea75e904114e3ba1e7af2f6ebd9182b9ed93 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 26 Oct 2020 12:34:09 +0100 Subject: [PATCH] set granted and granted_date in InternView.done() --- input/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/input/views.py b/input/views.py index eb4dda8..31ede57 100644 --- a/input/views.py +++ b/input/views.py @@ -1,3 +1,5 @@ +from datetime import date + from django.shortcuts import render from django.forms import modelformset_factory from django.http import HttpResponse @@ -87,6 +89,8 @@ class InternView(CookieWizardView): form.realname = data['realname'] # form.username = data['username'] form.email = data['email'] + form.granted = True + form.granted_date = date.today() form.save() return done(self.request)