Commit b97ea923 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

set string representation for Protein objects

parent 4f23f5f2
......@@ -104,6 +104,9 @@ class Protein(models.Model):
mol_function.save()
self.molecular_functions.add(mol_function)
def __str__(self):
return '{} ({})'.format(self.uniprot_id, self.recommended_name_long)
class Domain(models.Model):
pfam_acc = models.CharField('Pfam Accession', max_length=10, unique=True)
pfam_id = models.CharField('Pfam Family Identifier', max_length=20)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment