Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
149988fe
Commit
149988fe
authored
7 years ago
by
Rachel TORCHET
Browse files
Options
Downloads
Patches
Plain Diff
tiny changes in form text placeholder
Former-commit-id: 05e17f3c7cfc33c143b0dbea1feab83240b12b17
parent
09964a24
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ippisite/ippidb/forms.py
+15
-6
15 additions, 6 deletions
ippisite/ippidb/forms.py
ippisite/ippidb/models.py
+4
-3
4 additions, 3 deletions
ippisite/ippidb/models.py
with
19 additions
and
9 deletions
ippisite/ippidb/forms.py
+
15
−
6
View file @
149988fe
...
@@ -7,19 +7,28 @@ class IdForm(ModelForm):
...
@@ -7,19 +7,28 @@ class IdForm(ModelForm):
class
Meta
:
class
Meta
:
model
=
Bibliography
model
=
Bibliography
fields
=
[
'
source
'
,
'
id_source
'
]
fields
=
[
'
source
'
,
'
id_source
'
]
widgets
=
{
'
source
'
:
forms
.
RadioSelect
,
'
id_source
'
:
forms
.
TextInput
(
attrs
=
{
'
placeholder
'
:
'
PubMed ID / DOI / Patent ID
'
}),
}
class
BibliographyForm
(
ModelForm
):
class
BibliographyForm
(
ModelForm
):
class
Meta
:
class
Meta
:
model
=
Bibliography
model
=
Bibliography
exclude
=
[
'
title
'
,
'
journal_name
'
,
'
authors_list
'
,
'
biblio_year
'
]
exclude
=
[
'
authors_list
'
,
'
biblio_year
'
]
class
PDBForm
(
forms
.
Form
):
class
PDBForm
(
forms
.
Form
):
pdb_id
=
forms
.
CharField
(
label
=
"
PDB ID
"
,
max_length
=
100
,
widget
=
forms
.
TextInput
(
attrs
=
{
'
placeholder
'
:
'
123456
'
}))
pdb_id
=
forms
.
CharField
(
label
=
"
PDB ID
"
,
max_length
=
100
,
widget
=
forms
.
TextInput
(
attrs
=
{
'
placeholder
'
:
'
e.g 4HHB
'
}))
class
ProteinForm
(
ModelForm
):
class
ProteinForm
(
ModelForm
):
class
Meta
:
class
Meta
:
model
=
Protein
model
=
Protein
exclude
=
[
'
recommended_name_long
'
,
'
short_name
'
]
exclude
=
[
'
recommended_name_long
'
,
'
short_name
'
]
widgets
=
{
'
uniprot_id
'
:
forms
.
TextInput
(
attrs
=
{
'
placeholder
'
:
'
e.g Q03164
'
}),
'
gene_name
'
:
forms
.
TextInput
(
attrs
=
{
'
placeholder
'
:
'
e.g KMT2A
'
}),
'
entry_name
'
:
forms
.
TextInput
(
attrs
=
{
'
placeholder
'
:
'
e.g KMT2A_HUMAN
'
}),
}
ARCHI_TYPE
=
(
ARCHI_TYPE
=
(
...
@@ -51,13 +60,13 @@ class ProteinDomainComplexTypeForm(forms.Form):
...
@@ -51,13 +60,13 @@ class ProteinDomainComplexTypeForm(forms.Form):
widget
=
forms
.
Select
(
widget
=
forms
.
Select
(
choices
=
ARCHI_TYPE
)
choices
=
ARCHI_TYPE
)
)
)
inhibited
=
forms
.
Multiple
ChoiceField
(
inhibited
=
forms
.
ChoiceField
(
widget
=
forms
.
CheckboxSelectMultiple
,
widget
=
forms
.
RadioSelect
,
choices
=
INHIBITED_CHOICES
,
choices
=
INHIBITED_CHOICES
,
)
)
stabilized
=
forms
.
Multiple
ChoiceField
(
stabilized
=
forms
.
ChoiceField
(
widget
=
forms
.
CheckboxSelectMultiple
,
widget
=
forms
.
RadioSelect
,
choices
=
STABILIZED_CHOICES
,
choices
=
STABILIZED_CHOICES
,
)
)
...
...
This diff is collapsed.
Click to expand it.
ippisite/ippidb/models.py
+
4
−
3
View file @
149988fe
...
@@ -9,8 +9,9 @@ class Bibliography(models.Model):
...
@@ -9,8 +9,9 @@ class Bibliography(models.Model):
Bibliography data table
Bibliography data table
"""
"""
SOURCES
=
(
SOURCES
=
(
(
'
PM
'
,
'
PubMed article
'
),
(
'
PM
'
,
'
PubMed ID
'
),
(
'
PT
'
,
'
Patent
'
)
(
'
PT
'
,
'
Patent
'
),
(
'
DO
'
,
'
DOI ID
'
)
)
)
source
=
models
.
CharField
(
'
Bibliographic type
'
,
max_length
=
2
,
choices
=
SOURCES
)
source
=
models
.
CharField
(
'
Bibliographic type
'
,
max_length
=
2
,
choices
=
SOURCES
)
id_source
=
models
.
CharField
(
'
Bibliographic ID
'
,
max_length
=
25
)
id_source
=
models
.
CharField
(
'
Bibliographic ID
'
,
max_length
=
25
)
...
@@ -77,7 +78,7 @@ class Protein(models.Model):
...
@@ -77,7 +78,7 @@ class Protein(models.Model):
short_name
=
models
.
CharField
(
'
Short name
'
,
max_length
=
50
)
short_name
=
models
.
CharField
(
'
Short name
'
,
max_length
=
50
)
gene_name
=
models
.
CharField
(
'
Gene name
'
,
unique
=
True
,
max_length
=
30
)
gene_name
=
models
.
CharField
(
'
Gene name
'
,
unique
=
True
,
max_length
=
30
)
entry_name
=
models
.
CharField
(
'
Entry name
'
,
max_length
=
30
)
entry_name
=
models
.
CharField
(
'
Entry name
'
,
max_length
=
30
)
organism
=
models
.
ForeignKey
(
'
Taxonomy
'
)
organism
=
models
.
ForeignKey
(
'
Taxonomy
'
,
default
=
'
Homo sapiens
'
)
molecular_functions
=
models
.
ManyToManyField
(
MolecularFunction
)
molecular_functions
=
models
.
ManyToManyField
(
MolecularFunction
)
def
save
(
self
,
*
args
,
**
kwargs
):
def
save
(
self
,
*
args
,
**
kwargs
):
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment