summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/wizards.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-17 10:29:00 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-17 10:29:00 +0100
commit5ce9e1b4823b9a389812122e4faea56e4d9af7e7 (patch)
tree31872b0875eefc5ad18ab54c026542752498fec6 /archaeological_warehouse/wizards.py
parent3bceceddcbb8eb08b5e37de0afe2aafc3f90abf7 (diff)
downloadIshtar-5ce9e1b4823b9a389812122e4faea56e4d9af7e7.tar.bz2
Ishtar-5ce9e1b4823b9a389812122e4faea56e4d9af7e7.zip
Wizard container: display container sheet at the end of the process (refs #3428)
Diffstat (limited to 'archaeological_warehouse/wizards.py')
-rw-r--r--archaeological_warehouse/wizards.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/archaeological_warehouse/wizards.py b/archaeological_warehouse/wizards.py
index 0adb06f75..42659ae23 100644
--- a/archaeological_warehouse/wizards.py
+++ b/archaeological_warehouse/wizards.py
@@ -77,6 +77,7 @@ class ContainerWizard(Wizard):
'ishtar/wizard/wizard_containerlocalisation.html',
}
ignore_init_steps = ['localisation']
+ wizard_done_window = reverse_lazy('show-container')
def get_form_kwargs(self, step=None):
kwargs = super(ContainerWizard, self).get_form_kwargs(step)
@@ -98,6 +99,7 @@ class ContainerWizard(Wizard):
Save the localisation
"""
super(ContainerWizard, self).done(form_list)
+ dct = {}
for idx, form in enumerate(form_list):
if not form.is_valid():
return self.render(form)
@@ -119,8 +121,12 @@ class ContainerWizard(Wizard):
)
localisation.reference = form.cleaned_data[div_name]
localisation.save()
+ dct = {'item': container}
+ self.current_object = container
+ # force evaluation of lazy urls
+ dct['wizard_done_window'] = unicode(self.wizard_done_window)
return render_to_response(
- self.wizard_done_template, {},
+ self.wizard_done_template, dct,
context_instance=RequestContext(self.request))