diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-21 18:29:47 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-21 18:29:47 +0200 |
commit | 92c84e043c6e788190980883265e50ed8a1fa5a1 (patch) | |
tree | 606b2c5299a5376e49addc4e2f8acc5d5f465fbe /archaeological_operations/wizards.py | |
parent | 0f0d096915e95b879b4c027d02e9e28e1279fa3d (diff) | |
download | Ishtar-92c84e043c6e788190980883265e50ed8a1fa5a1.tar.bz2 Ishtar-92c84e043c6e788190980883265e50ed8a1fa5a1.zip |
Djangoization - Major refactoring (step 9)
* move templates
* change labels
Diffstat (limited to 'archaeological_operations/wizards.py')
-rw-r--r-- | archaeological_operations/wizards.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 2dae72aad..7c09c1154 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -33,8 +33,7 @@ class OperationWizard(Wizard): def get_template_names(self): templates = super(OperationWizard, self).get_template_names() - current_step = storage.get_current_step() or self.get_first_step( - request, storage) + current_step = self.steps. current if current_step.startswith('towns-'): # vérifier que le context_data est bien chargé #templates = ['ishtar/wizard/towns_wizard.html'] + templates @@ -45,7 +44,7 @@ class OperationWizard(Wizard): """ Return extra context for templates """ - context = super(OperationWizard, self).get_context_data(forms, + context = super(OperationWizard, self).get_context_data(form, **kwargs) #step = self.determine_step(request, storage) step = self.steps.current @@ -207,7 +206,7 @@ class OperationAdministrativeActWizard(OperationWizard): else: admact = models.AdministrativeAct(**dct) admact.save() - res = render_to_response('wizard_done.html', {}, + res = render_to_response('ishtar/wizard/wizard_done.html', {}, context_instance=RequestContext(self.request)) return res @@ -227,7 +226,7 @@ class AdministrativeActDeletionWizard(ClosingWizard): def done(self, form_list, **kwargs): obj = self.get_current_object() obj.delete() - return render_to_response('wizard_done.html', {}, + return render_to_response('ishtar/wizard/wizard_delete_done.html', {}, context_instance=RequestContext(self.request)) def is_preventive(form_name, model, type_key='operation_type', key=''): |