From: Diane Trout Date: Wed, 7 May 2014 00:15:15 +0000 (-0700) Subject: Add fields list to a few ModelForms Meta class. X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=543e7dbd350fa35c2917c2798991af58b263b03c Add fields list to a few ModelForms Meta class. Django 1.7 threw a warning that they were going to require that by 1.8 --- diff --git a/htsworkflow/frontend/experiments/admin.py b/htsworkflow/frontend/experiments/admin.py index 1a27a17..e2ea659 100644 --- a/htsworkflow/frontend/experiments/admin.py +++ b/htsworkflow/frontend/experiments/admin.py @@ -13,6 +13,7 @@ from django.utils.translation import ugettext_lazy as _ class DataFileForm(ModelForm): class Meta: model = DataFile + fields = ('random_key', 'data_run', 'library', 'file_type', 'relative_pathname') class DataFileInline(admin.TabularInline): model = DataFile @@ -65,6 +66,8 @@ class LaneForm(ModelForm): class Meta: model = Lane + fields = ('flowcell', 'lane_number', 'library', 'pM', 'cluster_estimate', + 'status', 'comment') class LaneInline(admin.StackedInline): """ diff --git a/htsworkflow/frontend/samples/admin.py b/htsworkflow/frontend/samples/admin.py index b97668d..619b383 100644 --- a/htsworkflow/frontend/samples/admin.py +++ b/htsworkflow/frontend/samples/admin.py @@ -78,6 +78,7 @@ class HTSUserCreationForm(UserCreationForm): class HTSUserChangeForm(UserChangeForm): class Meta: model = HTSUser + fields = ("username",'first_name','last_name') class HTSUserOptions(UserAdmin): form = HTSUserChangeForm