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
93bbdbf7
Commit
93bbdbf7
authored
7 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
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
from
django.shortcuts
import
render
from
django.http
import
HttpResponseRedirect
from
formtools.wizard.views
import
SessionWizardView
,
NamedUrlSessionWizardView
...
...
@@ -38,6 +39,9 @@ TEMPLATES = {"IdForm": "IdForm.html",
"
ProteinDomainComplexForm
"
:
"
ProteinDomainComplexForm.html
"
,
"
PpiForm
"
:
"
PpiForm.html
"
}
class
Ol
(
list
):
ordered
=
True
class
IppiWizard
(
NamedUrlSessionWizardView
):
def
get_template_names
(
self
):
return
[
TEMPLATES
[
self
.
steps
.
current
]]
...
...
@@ -62,8 +66,7 @@ class IppiWizard(NamedUrlSessionWizardView):
p
.
uniprot_id
=
uniprot_ids
[
0
]
p
.
autofill
()
proteins
.
append
(
p
)
#TODO replace p with proteins as the instance_dict
self
.
instance_dict
[
'
ProteinForm
'
]
=
p
self
.
instance_dict
[
'
ProteinForm
'
]
=
Ol
(
proteins
)
return
self
.
get_form_step_data
(
form
)
def
done
(
self
,
form_list
,
**
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