Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ethikis_survey_export_results
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor 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
Le Filament
Ethikis
ethikis_survey_export_results
Commits
c6b96d4e
Commit
c6b96d4e
authored
4 years ago
by
Jordan
Browse files
Options
Downloads
Patches
Plain Diff
[add] première colonne = heure de réponse
parent
84378483
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/ethikis_survey_export.py
+4
-3
4 additions, 3 deletions
models/ethikis_survey_export.py
with
4 additions
and
3 deletions
models/ethikis_survey_export.py
+
4
−
3
View file @
c6b96d4e
...
@@ -20,8 +20,9 @@ class Survey(models.Model):
...
@@ -20,8 +20,9 @@ class Survey(models.Model):
for
question_id
in
question_ids
:
for
question_id
in
question_ids
:
columns
.
append
(
question_id
.
question
)
columns
.
append
(
question_id
.
question
)
worksheet
.
write
(
0
,
0
,
"
Heure de réponse
"
)
for
i
,
fieldname
in
enumerate
(
columns
):
for
i
,
fieldname
in
enumerate
(
columns
):
worksheet
.
write
(
0
,
i
,
fieldname
)
worksheet
.
write
(
0
,
i
+
1
,
fieldname
)
worksheet
.
col
(
i
).
width
=
8000
# around 220 pixels
worksheet
.
col
(
i
).
width
=
8000
# around 220 pixels
base_style
=
xlwt
.
easyxf
(
'
align: wrap yes
'
)
base_style
=
xlwt
.
easyxf
(
'
align: wrap yes
'
)
...
@@ -45,9 +46,9 @@ class Survey(models.Model):
...
@@ -45,9 +46,9 @@ class Survey(models.Model):
answers
=
answers_to_that_question_id
.
get_user_answers
()
answers
=
answers_to_that_question_id
.
get_user_answers
()
else
:
else
:
answers
=
False
answers
=
False
print
(
'
-----answer
'
,
cell_index
,
answers
)
worksheet
.
write
(
row_index
+
1
,
cell_index
+
1
,
str
(
answers
),
cell_style
)
worksheet
.
write
(
row_index
+
1
,
cell_index
,
str
(
answers
),
cell_style
)
cell_index
=
cell_index
+
1
cell_index
=
cell_index
+
1
worksheet
.
write
(
row_index
+
1
,
0
,
str
(
user_input_id
.
create_date
))
row_index
=
row_index
+
1
row_index
=
row_index
+
1
return
workbook
return
workbook
...
...
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