diff options
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) | 
