From 2025f1a801c25d69265b77f5f780d1a93bea2a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Fri, 24 Mar 2017 22:26:01 +0100 Subject: [PATCH] set molecular function description as the default label for object --- ippisite/ippidb/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ippisite/ippidb/models.py b/ippisite/ippidb/models.py index 42701053..f6678524 100644 --- a/ippisite/ippidb/models.py +++ b/ippisite/ippidb/models.py @@ -68,6 +68,9 @@ class MolecularFunction(models.Model): go_id = models.CharField('Gene Ontology ID', unique=True, max_length=10) # GO term id format: 'GO:0000000' description = models.CharField('description', max_length=500) + def __str__(self): + return self.description + class Protein(models.Model): uniprot_id = models.CharField('Uniprot ID', unique=True, max_length=10) recommended_name_long = models.CharField('Uniprot Recommended Name (long)', max_length=75) -- GitLab