def setUpWidgets(self): LaunchpadEditFormView.setUpWidgets(self) timeformat = '%Y-%m-%d %H:%M' self.widgets['time_starts'].timeformat = timeformat self.widgets['time_ends'].timeformat = timeformat time_zone_widget = self.widgets['time_zone'] # What time zone are the start and end values relative to? if time_zone_widget.hasValidInput(): tz = pytz.timezone(time_zone_widget.getInputValue()) else: tz = pytz.timezone(self.context.time_zone) self.widgets['time_starts'].required_time_zone = tz self.widgets['time_ends'].required_time_zone = tz
def setUpWidgets(self): LaunchpadEditFormView.setUpWidgets(self) timeformat = '%Y-%m-%d %H:%M' self.widgets['time_starts'].timeformat = timeformat self.widgets['time_ends'].timeformat = timeformat time_zone_widget = self.widgets['time_zone'] # What time zone are the start and end values relative to? if time_zone_widget.hasValidInput(): tz = pytz.timezone(time_zone_widget.getInputValue()) else: tz = pytz.timezone(self.context.time_zone) self.widgets['time_starts'].required_time_zone = tz self.widgets['time_ends'].required_time_zone = tz
def setUpWidgets(self): """Set up the widgets using the bug as the context.""" LaunchpadEditFormView.setUpWidgets(self, context=self.context.bug)