Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
3d349f75
Commit
3d349f75
authored
Mar 27, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore checks which should be ignored
parent
6ebb1a55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
trans/views.py
trans/views.py
+8
-8
No files found.
trans/views.py
View file @
3d349f75
...
...
@@ -56,13 +56,13 @@ def home(request):
def
show_checks
(
request
):
return
render_to_response
(
'checks.html'
,
RequestContext
(
request
,
{
'checks'
:
Check
.
objects
.
values
(
'check'
).
annotate
(
count
=
Count
(
'id'
)),
'checks'
:
Check
.
objects
.
filter
(
ignore
=
False
).
values
(
'check'
).
annotate
(
count
=
Count
(
'id'
)),
'title'
:
_
(
'Checks'
),
}))
def
show_check
(
request
,
name
):
try
:
sample
=
Check
.
objects
.
filter
(
check
=
name
)[
0
]
sample
=
Check
.
objects
.
filter
(
check
=
name
,
ignore
=
False
)[
0
]
except
IndexError
:
raise
Http404
(
'No check matches the given query.'
)
...
...
@@ -75,13 +75,13 @@ def show_check(request, name):
def
show_check_project
(
request
,
name
,
project
):
prj
=
get_object_or_404
(
Project
,
slug
=
project
)
try
:
sample
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
prj
)[
0
]
sample
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
prj
,
ignore
=
False
)[
0
]
except
IndexError
:
raise
Http404
(
'No check matches the given query.'
)
langs
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
prj
).
values_list
(
'language'
,
flat
=
True
).
distinct
()
langs
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
prj
,
ignore
=
False
).
values_list
(
'language'
,
flat
=
True
).
distinct
()
units
=
Unit
.
objects
.
none
()
for
lang
in
langs
:
checks
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
prj
,
language
=
lang
).
values_list
(
'checksum'
,
flat
=
True
).
distinct
()
checks
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
prj
,
language
=
lang
,
ignore
=
False
).
values_list
(
'checksum'
,
flat
=
True
).
distinct
()
res
=
Unit
.
objects
.
filter
(
checksum__in
=
checks
,
translation__language
=
lang
,
translation__subproject__project
=
prj
).
values
(
'translation__subproject__slug'
,
'translation__subproject__project__slug'
).
annotate
(
count
=
Count
(
'id'
))
units
|=
res
return
render_to_response
(
'check_project.html'
,
RequestContext
(
request
,
{
...
...
@@ -94,13 +94,13 @@ def show_check_project(request, name, project):
def
show_check_subproject
(
request
,
name
,
project
,
subproject
):
subprj
=
get_object_or_404
(
SubProject
,
slug
=
subproject
,
project__slug
=
project
)
try
:
sample
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
subprj
.
project
)[
0
]
sample
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
subprj
.
project
,
ignore
=
False
)[
0
]
except
IndexError
:
raise
Http404
(
'No check matches the given query.'
)
langs
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
subprj
.
project
).
values_list
(
'language'
,
flat
=
True
).
distinct
()
langs
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
subprj
.
project
,
ignore
=
False
).
values_list
(
'language'
,
flat
=
True
).
distinct
()
units
=
Unit
.
objects
.
none
()
for
lang
in
langs
:
checks
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
subprj
.
project
,
language
=
lang
).
values_list
(
'checksum'
,
flat
=
True
).
distinct
()
checks
=
Check
.
objects
.
filter
(
check
=
name
,
project
=
subprj
.
project
,
language
=
lang
,
ignore
=
False
).
values_list
(
'checksum'
,
flat
=
True
).
distinct
()
res
=
Unit
.
objects
.
filter
(
translation__subproject
=
subprj
,
checksum__in
=
checks
,
translation__language
=
lang
).
values
(
'translation__language__code'
).
annotate
(
count
=
Count
(
'id'
))
units
|=
res
return
render_to_response
(
'check_subproject.html'
,
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