From 23d6a9e233a8170210ae561541986d529ca29506 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr>
Date: Tue, 16 May 2017 22:40:52 +0200
Subject: [PATCH] add string representation to ProteinDomainComplex class

---
 ippisite/ippidb/models.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ippisite/ippidb/models.py b/ippisite/ippidb/models.py
index b5d4fd17..a5417a44 100644
--- a/ippisite/ippidb/models.py
+++ b/ippisite/ippidb/models.py
@@ -126,6 +126,9 @@ class ProteinDomainComplex(models.Model):
     class Meta:
         verbose_name_plural = "complexes"
 
+    def __str__(self):
+        return '{}-{}'.format(self.protein_id, self.domain_id)
+
 class ProteinDomainBoundComplex(ProteinDomainComplex):
     ppp_copy_nb_per_p = models.IntegerField('Number of copies of the protein in the pocket')
     pockets_nb = models.IntegerField('Total number of pockets in the complex')
-- 
GitLab