set granted and granted_date in InternView.done()

This commit is contained in:
Benni Bärmann 2020-10-26 12:34:09 +01:00
parent aa5de1c08d
commit d82cea75e9
1 changed files with 4 additions and 0 deletions

View File

@ -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)