From ea73bf44c5d527f407c89b35b22b21abf2f32617 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 21 Oct 2012 01:31:49 +0200 Subject: Djangoization - Major refactoring (step 7) Work on archaeological_files wizards --- archaeological_context_records/models.py | 7 ++++--- archaeological_context_records/wizards.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'archaeological_context_records') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 75653e78e..64772627b 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -143,7 +143,7 @@ class ContextRecord(BaseHistorizedItem, OwnPerms): return self.short_label() def short_label(self): - return JOINT.join([unicode(item) for item in [self.parcel, + return settings.JOINT.join([unicode(item) for item in [self.parcel, self.label] if item]) def full_label(self): @@ -154,13 +154,14 @@ class ContextRecord(BaseHistorizedItem, OwnPerms): def _real_label(self): if not self.parcel.operation.code_patriarche: return - return JOINT.join((self.parcel.operation.code_patriarche, + return settings.JOINT.join((self.parcel.operation.code_patriarche, self.label)) def _temp_label(self): if self.parcel.operation.code_patriarche: return - return JOINT.join([unicode(lbl) for lbl in [self.parcel.operation.year, + return settings.JOINT.join([unicode(lbl) for lbl in [ + self.parcel.operation.year, self.parcel.operation.operation_code, self.label] if lbl]) diff --git a/archaeological_context_records/wizards.py b/archaeological_context_records/wizards.py index b14272e16..1fd657bcc 100644 --- a/archaeological_context_records/wizards.py +++ b/archaeological_context_records/wizards.py @@ -73,7 +73,8 @@ class RecordWizard(Wizard): else: data = {} if not step: - step = self.determine_step(request, storage) + step = self.steps.current + #step = self.determine_step(request, storage) form = self.get_form_list(request, storage)[step] general_form_key = 'general-' + self.url_name -- cgit v1.2.3