From 16fbb32b8ba00325a7b813825f288cb097699c98 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 22 Dec 2014 12:55:56 +0100 Subject: Workon alternate administrativ wizard * reorganization of address fields * add a main town field * reorganize parcel wizard * workon new administrativ wizard --- archaeological_files/wizards.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'archaeological_files/wizards.py') diff --git a/archaeological_files/wizards.py b/archaeological_files/wizards.py index 4ad947641..2279fef4f 100644 --- a/archaeological_files/wizards.py +++ b/archaeological_files/wizards.py @@ -38,8 +38,10 @@ class FileWizard(OperationWizard): model = models.File object_parcel_type = 'associated_file' parcel_step_key = 'parcels-' + town_step_key = 'towns-' wizard_done_window = reverse_lazy('show-file') + ''' def get_form(self, step=None, data=None, files=None): """ Manage towns @@ -53,8 +55,10 @@ class FileWizard(OperationWizard): # step = self.determine_step(request, storage) step = self.steps.current form = self.get_form_list()[step] - town_form_key = 'towns-' + self.url_name - if step.startswith('parcels-') and hasattr(form, 'management_form') \ + town_form_key = self.town_step_key + town_form_key += self.url_name + if step.startswith(self.parcel_step_key) \ + and hasattr(form, 'management_form') \ and self.session_has_key(town_form_key): towns = [] qdict = self.request.session[self.storage.prefix]['step_data']\ @@ -68,7 +72,9 @@ class FileWizard(OperationWizard): pass data['TOWNS'] = sorted(towns, key=lambda x:x[1]) form = super(FileWizard, self).get_form(step, data, files) + """ return form + ''' def get_extra_model(self, dct, form_list): dct = super(FileWizard, self).get_extra_model(dct, form_list) -- cgit v1.2.3