diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-12-22 12:55:56 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-05-06 15:34:36 +0200 |
commit | 16fbb32b8ba00325a7b813825f288cb097699c98 (patch) | |
tree | 0d369c66f0fb06db3d99e55523623468db02d619 /archaeological_files/wizards.py | |
parent | 6dfd3fcc84950ac8a86824fad7b0e9acb407091e (diff) | |
download | Ishtar-16fbb32b8ba00325a7b813825f288cb097699c98.tar.bz2 Ishtar-16fbb32b8ba00325a7b813825f288cb097699c98.zip |
Workon alternate administrativ wizard
* reorganization of address fields
* add a main town field
* reorganize parcel wizard
* workon new administrativ wizard
Diffstat (limited to 'archaeological_files/wizards.py')
-rw-r--r-- | archaeological_files/wizards.py | 10 |
1 files changed, 8 insertions, 2 deletions
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) |