diff --git a/snpdb/models/models_columns.py b/snpdb/models/models_columns.py index 17cc76699..b27dcd0b3 100644 --- a/snpdb/models/models_columns.py +++ b/snpdb/models/models_columns.py @@ -28,8 +28,17 @@ class VariantGridColumn(models.Model): model_field = models.BooleanField(default=True) # Standard field, can use Meta inspection to determine colmodel queryset_field = models.BooleanField(default=True) # In queryset.values() (field or alias) + # These are required to be in custom columns + _MANDATORY_COLUMNS = { + "tags", + "tags_global", + } + def get_css_classes(self): css_classes = ["user-column"] + if self.grid_column_name in self._MANDATORY_COLUMNS: + css_classes.append("mandatory") + if self.annotation_level: annotation_level_class = ColumnAnnotationLevel(self.annotation_level).label css_classes.append("%s-column" % annotation_level_class.lower()) diff --git a/variantgrid/static_files/default_static/page_help/settings/view_custom_columns_help.html b/variantgrid/static_files/default_static/page_help/settings/view_custom_columns_help.html index 0c03409e4..f42150d06 100644 --- a/variantgrid/static_files/default_static/page_help/settings/view_custom_columns_help.html +++ b/variantgrid/static_files/default_static/page_help/settings/view_custom_columns_help.html @@ -1,6 +1,15 @@ Drag and drop columns to add/remove and change ordering. -The special first "variant" column is automatically created for all custom columns. + + +

Adding / Removing columns