Revision 69c822cc snf-astakos-app/astakos/im/forms.py
b/snf-astakos-app/astakos/im/forms.py | ||
---|---|---|
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
from urlparse import urljoin |
34 | 34 |
from random import random |
35 |
from datetime import datetime |
|
35 | 36 |
|
36 | 37 |
from django import forms |
37 | 38 |
from django.utils.translation import ugettext as _ |
... | ... | |
808 | 809 |
|
809 | 810 |
def save(self, commit=True): |
810 | 811 |
application = super(ProjectApplicationForm, self).save(commit=False) |
811 |
applicant = self.user
|
|
812 |
comments = self.cleaned_data.pop('comments', None)
|
|
813 |
return submit_application(
|
|
814 |
application,
|
|
815 |
self.resource_policies,
|
|
816 |
applicant,
|
|
817 |
comments,
|
|
818 |
self.precursor_application |
|
819 |
) |
|
812 |
data = dict(self.fields)
|
|
813 |
data['precursor_application'] = self.instance.id
|
|
814 |
data['applicant'] = self.user
|
|
815 |
data['owner'] = self.user
|
|
816 |
data['comments'] = self.cleaned_data.pop('comments', None)
|
|
817 |
data['resource_policies'] = self.resource_policies
|
|
818 |
submit_application(**data)
|
|
819 |
|
|
820 |
|
|
820 | 821 |
|
821 | 822 |
class ProjectSortForm(forms.Form): |
822 | 823 |
sorting = forms.ChoiceField( |
Also available in: Unified diff