Revision 8172d87d
b/snf-astakos-app/astakos/im/forms.py | ||
---|---|---|
86 | 86 |
r'^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$', |
87 | 87 |
re.IGNORECASE) |
88 | 88 |
|
89 |
today = datetime.now() |
|
90 |
today = datetime(today.year, today.month, today.day) |
|
91 |
|
|
92 | 89 |
class StoreUserMixin(object): |
93 | 90 |
|
94 | 91 |
def store_user(self, user, request): |
... | ... | |
777 | 774 |
def clean_start_date(self): |
778 | 775 |
start_date = self.cleaned_data.get('start_date') |
779 | 776 |
if not self.precursor_application: |
777 |
today = datetime.now() |
|
778 |
today = datetime(today.year, today.month, today.day) |
|
780 | 779 |
if start_date and (start_date - today).days < 0: |
781 | 780 |
raise forms.ValidationError( |
782 | 781 |
_(astakos_messages.INVALID_PROJECT_START_DATE)) |
... | ... | |
785 | 784 |
def clean_end_date(self): |
786 | 785 |
start_date = self.cleaned_data.get('start_date') |
787 | 786 |
end_date = self.cleaned_data.get('end_date') |
787 |
today = datetime.now() |
|
788 |
today = datetime(today.year, today.month, today.day) |
|
788 | 789 |
if end_date and (end_date - today).days < 0: |
789 | 790 |
raise forms.ValidationError( |
790 | 791 |
_(astakos_messages.INVALID_PROJECT_END_DATE)) |
Also available in: Unified diff