Commit 6a8946f9 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

add text descriptions for Ppi and PpiComplex models

parent b523d132
......@@ -153,6 +153,9 @@ class Ppi(models.Model):
pdb_id = models.CharField('PDB ID', max_length=4, null=True)
symmetry = models.ForeignKey(Symmetry)
def __str__(self):
return '{} PPI, PDB:{}'.format(self.symmetry.description, self.pdb_id or 'unknown')
class PpiComplex(models.Model):
ppi = models.ForeignKey(Ppi)
complex = models.ForeignKey(ProteinDomainComplex)
......@@ -161,6 +164,9 @@ class PpiComplex(models.Model):
class Meta:
verbose_name_plural = "Ppi complexes"
def __str__(self):
return 'PPI {}, Complex {} ({})'.format(self.ppi, self.complex, self.cc_nb)
class Disease(models.Model):
ppi = models.ForeignKey(Ppi)
disease_name = models.CharField('Disease', max_length=30) # is there any database/nomenclature for diseases?
......
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