summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/forms.py2
-rw-r--r--ishtar_common/wizards.py11
2 files changed, 10 insertions, 3 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index 04cd5a327..5be5deafe 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -395,7 +395,7 @@ class MultiSearchForm(CustomFormSearch):
raise NotImplementedError("A \"pk\" field must be defined")
if self.pk_key not in self.associated_models:
raise NotImplementedError("\"{}\" must be defined in "
- "associated_models")
+ "associated_models".format(self.pk_key))
self.fields['pk'].required = True
self.fields[self.pk_key] = self.fields.pop('pk')
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 9c89fd04b..0c13139df 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -1527,7 +1527,7 @@ class DeletionWizard(Wizard):
(hasattr(self, 'model') and hasattr(self.model, 'TABLE_COLS')):
self.fields = self.model.TABLE_COLS
assert self.model
- return super(DeletionWizard, self).__init__(*args, **kwargs)
+ super(DeletionWizard, self).__init__(*args, **kwargs)
def get_formated_datas(self, forms):
datas = super(DeletionWizard, self).get_formated_datas(forms)
@@ -1604,7 +1604,14 @@ class MultipleDeletionWizard(MultipleItemWizard):
(hasattr(self, 'model') and hasattr(self.model, 'TABLE_COLS')):
self.fields = self.model.TABLE_COLS
assert self.model
- return super(MultipleDeletionWizard, self).__init__(*args, **kwargs)
+ super(MultipleDeletionWizard, self).__init__(*args, **kwargs)
+
+ def get_template_names(self):
+ current_step = self.steps.current
+ if current_step.startswith("final-") and \
+ current_step not in self.wizard_templates:
+ return ["ishtar/wizard/delete_wizard.html"]
+ return super(MultipleDeletionWizard, self).get_template_names()
def get_formated_datas(self, forms):
datas = super(MultipleDeletionWizard, self).get_formated_datas(forms)