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
db53dd4c
Commit
db53dd4c
authored
Feb 15, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cached lodaer detection and reporting in admin interface
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
dadb3925
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
weblate/settings_example.py
weblate/settings_example.py
+0
-1
weblate/trans/admin_views.py
weblate/trans/admin_views.py
+21
-8
No files found.
weblate/settings_example.py
View file @
db53dd4c
...
...
@@ -38,7 +38,6 @@ if django.VERSION < (1, 4, 0):
#
DEBUG
=
True
TEMPLATE_DEBUG
=
DEBUG
ADMINS
=
(
# ('Your Name', 'your_email@example.com'),
...
...
weblate/trans/admin_views.py
View file @
db53dd4c
...
...
@@ -28,6 +28,8 @@ from django.utils.translation import ugettext as _
from
django.conf
import
settings
import
django
import
six
from
weblate.trans.models
import
SubProject
,
IndexUpdate
from
weblate
import
settings_example
from
weblate
import
appsettings
...
...
@@ -67,6 +69,23 @@ def report(request):
)
def
get_first_loader
():
"""Returns first loader from settings"""
if
settings
.
TEMPLATES
:
loaders
=
settings
.
TEMPLATES
[
0
].
get
(
'OPTIONS'
,
{}
).
get
(
'loaders'
,
[[
''
]]
)
else
:
loaders
=
settings
.
TEMPLATE_LOADERS
if
isinstance
(
loaders
[
0
],
six
.
string_types
):
return
loaders
[
0
]
return
loaders
[
0
][
0
]
@
staff_member_required
def
performance
(
request
):
"""
...
...
@@ -194,19 +213,13 @@ def performance(request):
', '
.
join
(
settings
.
ALLOWED_HOSTS
),
))
if
settings
.
TEMPLATES
:
loader
=
settings
.
TEMPLATES
[
0
].
get
(
'OPTIONS'
,
{}
).
get
(
'loaders'
,
[[
''
]]
)[
0
][
0
]
else
:
loader
=
settings
.
TEMPLATE_LOADERS
[
0
][
0
]
loader
=
get_first_loader
()
# Cached template loader
checks
.
append
((
_
(
'Cached template loader'
),
'cached.Loader'
in
loader
,
'production-templates'
,
loader
,
))
# Check for serving static files
...
...
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