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
La Quadrature du Net
Respect My Net
Commits
0e0f7b87
Commit
0e0f7b87
authored
Nov 20, 2011
by
stef
Browse files
[mod] reordered, re-phrased stats
parent
4cf9ad45
Changes
1
Hide whitespace changes
Inline
Side-by-side
bt/views.py
View file @
0e0f7b87
...
...
@@ -209,10 +209,9 @@ def index(request):
return
render_to_response
(
'index.html'
,
{
'form'
:
form
,
'stats'
:
[
(
_
(
'Countries with reports (confirmed)'
),
len
(
countries
),
len
([
i
for
i
,
z
in
confirms
if
i
>
1
])),
(
_
(
'Total reports (confirmed)'
),
sum
([
i
for
i
,
z
in
countries
]),
len
([
i
for
i
,
z
in
reports
if
i
>
1
])),
(
_
(
'Total Operators with reports (confirmed)'
),
len
(
operators
),
len
([
x
for
x
in
operators
if
x
[
0
]
>
1
])),
(
_
(
'Total confirmations (most)'
),
sum
([
i
for
i
,
z
in
confirms
]),
reports
[
0
][
0
]),
'stats'
:
[
(
_
(
'Total reports (confirmed)'
),
sum
([
i
for
i
,
z
in
countries
]),
len
([
i
for
i
,
z
in
reports
if
i
>
1
])),
(
_
(
'Countries with reports (confirmed)'
),
len
(
countries
),
len
([
i
for
i
,
z
in
confirms
if
i
>
1
])),
(
_
(
'Operators with reports (confirmed)'
),
len
(
operators
),
len
([
x
for
x
in
operators
if
x
[
0
]
>
1
])),
],
'violations'
:
v_list
},
context_instance
=
RequestContext
(
request
))
...
...
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