diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-07-16 13:03:27 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-07-16 13:03:27 +0200 |
commit | 6bb7d4cbf47c61fd168998a0423a31814eaa7fe0 (patch) | |
tree | f0b7c63834d4fe9125d043893dad8765975a78b1 /archaeological_finds/views.py | |
parent | 3748baac6501db293424d1ae5d092e8672a68f7f (diff) | |
parent | 242c13fdc9895abdcd1af79bce2a9b3f98f3f939 (diff) | |
download | Ishtar-6bb7d4cbf47c61fd168998a0423a31814eaa7fe0.tar.bz2 Ishtar-6bb7d4cbf47c61fd168998a0423a31814eaa7fe0.zip |
Merge branch 'master-WIP-treatments'
Diffstat (limited to 'archaeological_finds/views.py')
-rw-r--r-- | archaeological_finds/views.py | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index d980ebd69..8bae9785c 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -317,37 +317,26 @@ class DeleteFindBasketView(IshtarMixin, LoginRequiredMixin, FormView): form.save() return HttpResponseRedirect(self.get_success_url()) -""" treatment_creation_wizard = TreatmentWizard.as_view([ ('basetreatment-treatment_creation', BaseTreatmentForm), ('selecfind-treatment_creation', UpstreamFindFormSelection), - ('multiselecfinds-treatment_creation', FindMultipleFormSelection), - ('container-treatment_creation', ContainerForm), ('resultfind-treatment_creation', ResultFindForm), ('resultfinds-treatment_creation', ResultFindFormSet), ('final-treatment_creation', FinalForm)], condition_dict={ - 'selecfind-treatment_creation': - check_treatment('basetreatment-treatment_creation', - 'treatment_type', not_type_list=['physical_grouping', - 'packaging']), - 'multiselecfinds-treatment_creation': - check_treatment('basetreatment-treatment_creation', - 'treatment_type', ['physical_grouping', - 'packaging']), - 'resultfinds-treatment_creation': - check_treatment('basetreatment-treatment_creation', - 'treatment_type', ['split']), - 'resultfind-treatment_creation': - check_treatment('basetreatment-treatment_creation', - 'treatment_type', not_type_list=['split']), - 'container-treatment_creation': - check_treatment('basetreatment-treatment_creation', - 'treatment_type', ['packaging']), - }, + 'selecfind-treatment_creation': + check_not_exist('basetreatment-treatment_creation', + 'basket'), + 'resultfinds-treatment_creation': + check_type_field('basetreatment-treatment_creation', + 'treatment_type', models.TreatmentType, + 'downstream_is_many'), + 'resultfind-treatment_creation': + check_type_field('basetreatment-treatment_creation', + 'treatment_type', models.TreatmentType, + 'upstream_is_many')}, label=_(u"New treatment"), url_name='treatment_creation',) -""" """ treatment_source_creation_wizard = TreatmentSourceWizard.as_view([ |