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):
...
@@ -38,7 +38,6 @@ if django.VERSION < (1, 4, 0):
#
#
DEBUG
=
True
DEBUG
=
True
TEMPLATE_DEBUG
=
DEBUG
ADMINS
=
(
ADMINS
=
(
# ('Your Name', 'your_email@example.com'),
# ('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 _
...
@@ -28,6 +28,8 @@ from django.utils.translation import ugettext as _
from
django.conf
import
settings
from
django.conf
import
settings
import
django
import
django
import
six
from
weblate.trans.models
import
SubProject
,
IndexUpdate
from
weblate.trans.models
import
SubProject
,
IndexUpdate
from
weblate
import
settings_example
from
weblate
import
settings_example
from
weblate
import
appsettings
from
weblate
import
appsettings
...
@@ -67,6 +69,23 @@ def report(request):
...
@@ -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
@
staff_member_required
def
performance
(
request
):
def
performance
(
request
):
"""
"""
...
@@ -194,19 +213,13 @@ def performance(request):
...
@@ -194,19 +213,13 @@ def performance(request):
', '
.
join
(
settings
.
ALLOWED_HOSTS
),
', '
.
join
(
settings
.
ALLOWED_HOSTS
),
))
))
if
settings
.
TEMPLATES
:
loader
=
get_first_loader
()
loader
=
settings
.
TEMPLATES
[
0
].
get
(
'OPTIONS'
,
{}
).
get
(
'loaders'
,
[[
''
]]
)[
0
][
0
]
else
:
loader
=
settings
.
TEMPLATE_LOADERS
[
0
][
0
]
# Cached template loader
# Cached template loader
checks
.
append
((
checks
.
append
((
_
(
'Cached template loader'
),
_
(
'Cached template loader'
),
'cached.Loader'
in
loader
,
'cached.Loader'
in
loader
,
'production-templates'
,
'production-templates'
,
loader
,
))
))
# Check for serving static files
# 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