def clean(self):
    cleaned_data = super(VoucherForm, self).clean()
    start_date = cleaned_data.get('start_date', None)
    end_date = cleaned_data.get('end_date', None)
    if (start_date and end_date and (end_date < start_date)):
        raise forms.ValidationError(_('The start date must be before the end date'))
    return cleaned_data
def clean(self):
    cleaned_data = super(VoucherForm, self).clean()
    start_date = cleaned_data.get('start_date', None)
    end_date = cleaned_data.get('end_date', None)
    if (start_date and end_date and (end_date < start_date)):
        raise forms.ValidationError(_('The start date must be before the end date'))
    return cleaned_data