def save(self): from common.methods import mkDateTime instance = self.initial_instance display_name = self.cleaned_data['display_name'] if display_name and hasattr(instance, 'label'): instance.label = display_name instance.minimum_version_required = self.cleaned_data['mvr'] updated = self.cleaned_data['last_updated'] if updated: instance.last_updated = mkDateTime(updated) else: instance.last_updated = None instance.library_list_image = self.cleaned_data['list_image'] instance.save() return instance
def clean_end_date(self): return mkDateTime(self.cleaned_data['end_date'])
def clean_start_date(self): return mkDateTime(self.cleaned_data['start_date'])