Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
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
cf9c2ee3
Commit
cf9c2ee3
authored
7 years ago
by
Rachel TORCHET
Browse files
Options
Downloads
Patches
Plain Diff
save data to pass between ProteinDomainComplex(Type)Form in wizard
Former-commit-id: f021cb531522fc7aa44570beefaaa81d906271a3
parent
267e2157
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ippisite/ippidb/views.py
+6
-1
6 additions, 1 deletion
ippisite/ippidb/views.py
with
6 additions
and
1 deletion
ippisite/ippidb/views.py
+
6
−
1
View file @
cf9c2ee3
...
...
@@ -5,7 +5,7 @@ from django.http import HttpResponseRedirect
from
formtools.wizard.views
import
SessionWizardView
,
NamedUrlSessionWizardView
from
.forms
import
IdForm
,
BibliographyForm
,
PDBForm
,
ProteinForm
,
ProteinDomainComplexTypeForm
,
ProteinDomainComplexForm
,
PpiForm
,
ProteinFormSet
,
PDBFormSet
from
.models
import
Protein
,
Bibliography
from
.models
import
Protein
,
Bibliography
,
ProteinDomainComplex
from
.ws
import
get_pdb_uniprot_mapping
def
index
(
request
):
...
...
@@ -68,6 +68,9 @@ class IppiWizard(NamedUrlSessionWizardView):
if
self
.
steps
.
current
==
'
ProteinForm
'
:
pks
=
self
.
storage
.
get_step_data
(
'
PDBForm
'
).
get
(
'
pks
'
)
return
Protein
.
objects
.
filter
(
id__in
=
pks
)
if
self
.
steps
.
current
==
'
ProteinDomainComplexForm
'
:
complexType
=
self
.
storage
.
get_step_data
(
'
ProteinDomainComplexTypeForm
'
).
get
(
'
complexType
'
)
return
ProteinDomainComplex
.
objects
.
get
(
complexType
=
complexType
)
def
process_step
(
self
,
form
):
"""
...
...
@@ -97,6 +100,8 @@ class IppiWizard(NamedUrlSessionWizardView):
p
.
save
()
protein_ids
.
append
(
p
.
id
)
data
[
'
pks
'
]
=
protein_ids
if
self
.
steps
.
current
==
'
ProteinDomainComplexTypeForm
'
:
data
[
'
complex_type
'
]
=
form
[
'
complexType
'
]
return
data
def
done
(
self
,
form_list
,
**
kwargs
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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