Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
SMASCH
scheduling-system
Commits
0c7fafa8
Commit
0c7fafa8
authored
8 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
export to csv fixed (new line doesn't break csv)
parent
451acd03
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
Appointments dev
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smash/web/models.py
+1
-1
1 addition, 1 deletion
smash/web/models.py
smash/web/views.py
+2
-2
2 additions, 2 deletions
smash/web/views.py
with
3 additions
and
3 deletions
smash/web/models.py
+
1
−
1
View file @
0c7fafa8
...
...
@@ -587,7 +587,7 @@ class Appointment(models.Model):
def
title
(
self
):
if
self
.
visit
.
subject
.
screening_number
==
"
---
"
:
return
self
.
comment
.
replace
(
"
\n
"
,
"
;
"
)
return
self
.
comment
.
replace
(
"
\n
"
,
"
;
"
)
.
replace
(
"
\r
"
,
"
;
"
)
else
:
title
=
self
.
visit
.
subject
.
first_name
+
"
"
+
self
.
visit
.
subject
.
last_name
+
"
type:
"
for
type
in
self
.
appointment_types
.
all
():
...
...
This diff is collapsed.
Click to expand it.
smash/web/views.py
+
2
−
2
View file @
0c7fafa8
...
...
@@ -663,7 +663,7 @@ def write_subjects_to_csv(writer):
row
=
[]
for
field
in
subject_fields
:
row
.
append
(
getattr
(
subject
,
field
.
name
))
writer
.
writerow
([
unicode
(
s
).
encode
(
"
utf-8
"
)
for
s
in
row
])
writer
.
writerow
([
unicode
(
s
).
replace
(
"
\n
"
,
"
;
"
).
replace
(
"
\r
"
,
"
;
"
).
encode
(
"
utf-8
"
)
for
s
in
row
])
def
write_appointments_to_csv
(
writer
):
appointments_fields
=
[]
...
...
@@ -695,7 +695,7 @@ def write_appointments_to_csv(writer):
for
type
in
appointment
.
appointment_types
.
all
():
type_string
+=
type
.
code
+
"
,
"
row
.
append
(
type_string
)
writer
.
writerow
([
unicode
(
s
).
encode
(
"
utf-8
"
)
for
s
in
row
])
writer
.
writerow
([
unicode
(
s
).
replace
(
"
\n
"
,
"
;
"
).
replace
(
"
\r
"
,
"
;
"
).
encode
(
"
utf-8
"
)
for
s
in
row
])
def
export
(
request
):
return
wrap_response
(
request
,
'
export/index.html
'
,{})
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