From 7fc0dbf6be9a9cabc080a57d591412dbc5d9d6d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Tue, 11 Jul 2017 14:23:54 +0200 Subject: [PATCH] do not display an empty form in Proteins step of the wizard Former-commit-id: a4e63cd284db189204557b1dbde2c0ebeb4f82a3 --- ippisite/ippidb/forms.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ippisite/ippidb/forms.py b/ippisite/ippidb/forms.py index 4e179130..b8fbd3e9 100644 --- a/ippisite/ippidb/forms.py +++ b/ippisite/ippidb/forms.py @@ -37,8 +37,7 @@ class ProteinForm(ModelForm): 'entry_name' : forms.TextInput(attrs={'placeholder':'e.g KMT2A_HUMAN'}), } -ProteinFormSet = modelformset_factory(Protein, exclude=('recommended_name_long', 'short_name')) -formset=ProteinFormSet() +ProteinFormSet = modelformset_factory(Protein, exclude=('recommended_name_long', 'short_name'), extra=0) ARCHI_TYPE = ( -- GitLab