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
93bbdbf7
Commit
93bbdbf7
authored
8 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
Hack instance_data in Wizard to enable non-queryset initial data
Former-commit-id: 9b734e59a7bbfa657c6f634e58ac50b90138d964
parent
690b534e
Branches
Branches containing commit
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
+5
-2
5 additions, 2 deletions
ippisite/ippidb/views.py
with
5 additions
and
2 deletions
ippisite/ippidb/views.py
+
5
−
2
View file @
93bbdbf7
import
ippidb
import
ippidb
from
django.shortcuts
import
render
from
django.shortcuts
import
render
from
django.http
import
HttpResponseRedirect
from
django.http
import
HttpResponseRedirect
from
formtools.wizard.views
import
SessionWizardView
,
NamedUrlSessionWizardView
from
formtools.wizard.views
import
SessionWizardView
,
NamedUrlSessionWizardView
...
@@ -38,6 +39,9 @@ TEMPLATES = {"IdForm": "IdForm.html",
...
@@ -38,6 +39,9 @@ TEMPLATES = {"IdForm": "IdForm.html",
"
ProteinDomainComplexForm
"
:
"
ProteinDomainComplexForm.html
"
,
"
ProteinDomainComplexForm
"
:
"
ProteinDomainComplexForm.html
"
,
"
PpiForm
"
:
"
PpiForm.html
"
}
"
PpiForm
"
:
"
PpiForm.html
"
}
class
Ol
(
list
):
ordered
=
True
class
IppiWizard
(
NamedUrlSessionWizardView
):
class
IppiWizard
(
NamedUrlSessionWizardView
):
def
get_template_names
(
self
):
def
get_template_names
(
self
):
return
[
TEMPLATES
[
self
.
steps
.
current
]]
return
[
TEMPLATES
[
self
.
steps
.
current
]]
...
@@ -62,8 +66,7 @@ class IppiWizard(NamedUrlSessionWizardView):
...
@@ -62,8 +66,7 @@ class IppiWizard(NamedUrlSessionWizardView):
p
.
uniprot_id
=
uniprot_ids
[
0
]
p
.
uniprot_id
=
uniprot_ids
[
0
]
p
.
autofill
()
p
.
autofill
()
proteins
.
append
(
p
)
proteins
.
append
(
p
)
#TODO replace p with proteins as the instance_dict
self
.
instance_dict
[
'
ProteinForm
'
]
=
Ol
(
proteins
)
self
.
instance_dict
[
'
ProteinForm
'
]
=
p
return
self
.
get_form_step_data
(
form
)
return
self
.
get_form_step_data
(
form
)
def
done
(
self
,
form_list
,
**
kwargs
):
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