Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iPPIDB
ippidb-web
Commits
6a8946f9
Commit
6a8946f9
authored
May 18, 2017
by
Hervé MENAGER
Browse files
add text descriptions for Ppi and PpiComplex models
parent
b523d132
Changes
1
Hide whitespace changes
Inline
Side-by-side
ippisite/ippidb/models.py
View file @
6a8946f9
...
...
@@ -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?
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment