Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
memopol
Commits
c786f5fb
Commit
c786f5fb
authored
Oct 09, 2016
by
Nicolas Joyard
Browse files
Fix QA
parent
da7aecbe
Pipeline
#171
failed with stage
in 15 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/memopol/views/charts.py
View file @
c786f5fb
...
...
@@ -2,7 +2,7 @@ import datetime
import
json
from
django.db.models
import
Q
from
django.http
import
HttpResponse
from
django.http
import
HttpResponse
,
HttpResponseNotFound
from
django.views
import
generic
from
representatives.models
import
Chamber
,
Representative
...
...
@@ -29,7 +29,8 @@ class ThemeScoresJSONView(generic.View):
data
=
{
"theme"
:
theme
.
name
,
"scores"
:
[
ts
[
'score'
]
for
ts
in
ThemeScore
.
objects
.
filter
(
theme
=
theme
).
order_by
(
'score'
).
values
(
'score'
)]
ThemeScore
.
objects
.
filter
(
theme
=
theme
).
order_by
(
'score'
)
.
values
(
'score'
)]
}
return
HttpResponse
(
json
.
dumps
(
data
),
content_type
=
'application/json'
)
...
...
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