Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Note Kfet 2015 django
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
BDE
Note Kfet 2015 django
Commits
f2ba6525
Commit
f2ba6525
authored
Aug 28, 2019
by
raida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirection from formulaire to 1a
parent
f565c305
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
note/templates/note/page_form.html
note/templates/note/page_form.html
+1
-1
note/views.py
note/views.py
+4
-5
No files found.
note/templates/note/page_form.html
View file @
f2ba6525
...
...
@@ -8,7 +8,7 @@
<li
role=
"presentation"
><a
href=
"{{ NOTE_ROOT_URL }}wei/1a/"
>
{% trans "Retour" %}
</a></li>
{% endblock %}
{% block content %}
*
{% block content %}
<h1>
{% trans "Questionnaire d'ambiance" %}
</h1>
<p>
...
...
note/views.py
View file @
f2ba6525
...
...
@@ -10,16 +10,13 @@
import
django
# Modules standard utiles
import
random
import
random
import
json
import
base64
import
subprocess
import
os
import
shutil
import
urllib
import
algo1a
import
re
from
django.shortcuts
import
redirect
from
datetime
import
datetime
from
tempfile
import
mkdtemp
...
...
@@ -1713,6 +1710,8 @@ def WEI1Aalgo(request, sock, kwargs):
if
request
.
method
==
"GET"
:
variables
[
"form"
]
=
forms
.
WEI1AForm
(
label_suffix
=
_
(
u
" :"
))
variables
[
"type"
]
=
'1a'
if
not
request
.
session
.
has_key
(
"wei1A2019"
):
return
redirect
(
'note/wei_1a.html'
)
variables
[
"liste"
]
=
algo1a
.
test
(
True
,
[],
request
.
session
[
"wei1A2019"
][
"nom"
]
+
request
.
session
[
"wei1A2019"
][
"prenom"
])
variables
[
"nb_quest"
]
=
0
request
.
session
[
"nb_quest"
]
=
0
...
...
@@ -1722,7 +1721,7 @@ def WEI1Aalgo(request, sock, kwargs):
request
.
session
[
"quest"
]
+=
separator
+
request
.
POST
.
get
(
"reponse"
)
variables
[
"liste"
]
=
algo1a
.
test
(
True
,
request
.
session
[
"quest"
].
split
(
"#"
),
request
.
session
[
"wei1A2019"
][
"nom"
]
+
request
.
session
[
"wei1A2019"
][
"prenom"
])
request
.
session
[
"nb_quest"
]
+=
1
variables
[
"nb_quest"
]
=
request
.
session
[
"nb_quest"
]
*
100
/
20
variables
[
"nb_quest"
]
=
request
.
session
[
"nb_quest"
]
*
100
/
20
if
variables
[
"liste"
]
is
None
:
# Fin du questionnaire
request
.
session
[
"wei1A2019"
][
"quest"
]
=
request
.
session
[
"quest"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment