set granted and granted_date in InternView.done()
This commit is contained in:
parent
aa5de1c08d
commit
d82cea75e9
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
from datetime import date
|
||||||
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.forms import modelformset_factory
|
from django.forms import modelformset_factory
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
|
@ -87,6 +89,8 @@ class InternView(CookieWizardView):
|
||||||
form.realname = data['realname']
|
form.realname = data['realname']
|
||||||
# form.username = data['username']
|
# form.username = data['username']
|
||||||
form.email = data['email']
|
form.email = data['email']
|
||||||
|
form.granted = True
|
||||||
|
form.granted_date = date.today()
|
||||||
form.save()
|
form.save()
|
||||||
|
|
||||||
return done(self.request)
|
return done(self.request)
|
||||||
|
|
Loading…
Reference in a new issue