def _validate_target(self, value, varprefix): targets = self.targets() try: targets.get(value) except KeyError: backup.SystemBackupTargetsReadOnly().validate_target(value, varprefix) return targets.validate_target(value, varprefix)
def backup_target_choices(self): choices = self.targets().choices() # Only add system wide defined targets that don't conflict with # the site specific backup targets choice_dict = dict(choices) for key, title in backup.SystemBackupTargetsReadOnly().choices(): if key not in choice_dict: choices.append((key, _("%s (system wide)") % title)) return sorted(choices, key=lambda x_y: x_y[1].title())
def page(self): self.targets().show_list() backup.SystemBackupTargetsReadOnly().show_list( editable=False, title=_("System global targets"))
def _show_target_list(self) -> None: super()._show_target_list() backup.SystemBackupTargetsReadOnly().show_list( editable=False, title=_("System global targets"))
def _get_target(self, target_ident): try: return self.targets().get(target_ident) except KeyError: return backup.SystemBackupTargetsReadOnly().get(target_ident)
def _show_target_list(self): # type: () -> None super(ModeBackupRestore, self)._show_target_list() backup.SystemBackupTargetsReadOnly().show_list(editable=False, title=_("System global targets"))