Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
InSillyClo-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
InSillyClo
InSillyClo-web
Commits
c89f5a04
Commit
c89f5a04
authored
2 weeks ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
compatibility with form_host and crispy
parent
33b15bae
No related branches found
No related tags found
2 merge requests
!13
Edit view job
,
!7
Simulator
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/InSillyCloWeb/assemblies/forms.py
+0
-3
0 additions, 3 deletions
src/InSillyCloWeb/assemblies/forms.py
src/InSillyCloWeb/assemblies/views.py
+8
-0
8 additions, 0 deletions
src/InSillyCloWeb/assemblies/views.py
with
8 additions
and
3 deletions
src/InSillyCloWeb/assemblies/forms.py
+
0
−
3
View file @
c89f5a04
...
@@ -60,9 +60,6 @@ class PCRModelForm(forms.ModelForm):
...
@@ -60,9 +60,6 @@ class PCRModelForm(forms.ModelForm):
model
=
SimulatorJob
model
=
SimulatorJob
fields
=
(
'
pcr_pairs_str
'
,)
fields
=
(
'
pcr_pairs_str
'
,)
helper
=
FormHelper
()
helper
.
form_tag
=
False
primers_file
=
forms
.
FileField
(
primers_file
=
forms
.
FileField
(
required
=
False
,
required
=
False
,
label
=
_
(
'
Primers file
'
),
label
=
_
(
'
Primers file
'
),
...
...
This diff is collapsed.
Click to expand it.
src/InSillyCloWeb/assemblies/views.py
+
8
−
0
View file @
c89f5a04
...
@@ -3,6 +3,7 @@ from abc import ABC, abstractmethod
...
@@ -3,6 +3,7 @@ from abc import ABC, abstractmethod
from
io
import
BytesIO
from
io
import
BytesIO
from
typing
import
Tuple
from
typing
import
Tuple
import
crispy_forms.helper
from
django.contrib
import
messages
from
django.contrib
import
messages
from
django.http
import
HttpResponse
from
django.http
import
HttpResponse
from
django.shortcuts
import
render
,
redirect
from
django.shortcuts
import
render
,
redirect
...
@@ -126,6 +127,13 @@ class SimulatorJobEdit(
...
@@ -126,6 +127,13 @@ class SimulatorJobEdit(
slug_url_kwarg
=
'
uuid
'
slug_url_kwarg
=
'
uuid
'
template_name
=
"
assemblies/form_host.html
"
template_name
=
"
assemblies/form_host.html
"
def
get_form
(
self
,
form_class
=
None
):
form
=
super
().
get_form
()
if
not
hasattr
(
form
,
'
helper
'
):
form
.
helper
=
crispy_forms
.
helper
.
FormHelper
()
form
.
helper
.
form_tag
=
False
return
form
def
form_valid
(
self
,
form
):
def
form_valid
(
self
,
form
):
self
.
object
.
run_simulator
()
self
.
object
.
run_simulator
()
return
super
().
form_valid
(
form
)
return
super
().
form_valid
(
form
)
...
...
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