Browse Source

set granted and granted_date in InternView.done()

master
Benni Baermann 4 years ago
parent
commit
d82cea75e9
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      input/views.py

+ 4
- 0
input/views.py View File

@ -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…
Cancel
Save