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
d847d115
Commit
d847d115
authored
Sep 07, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide more verbose hints for production setup
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
d6fe9073
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
weblate/html/admin/performance.html
weblate/html/admin/performance.html
+3
-1
weblate/trans/admin_views.py
weblate/trans/admin_views.py
+16
-1
No files found.
weblate/html/admin/performance.html
View file @
d847d115
...
...
@@ -19,14 +19,16 @@
<thead>
<tr>
<th>
{% trans "Check" %}
</th>
<th>
{% trans "Status" %}
</th>
<th>
{% trans "Result" %}
</th>
<th>
{% trans "Documentation" %}
</th>
</tr>
</thead>
<tbody>
{% for check in checks %}
<tr
class=
"row{% cycle '1' '2' %} {{ check.
3
}}"
>
<tr
class=
"row{% cycle '1' '2' %} {{ check.
4
}}"
>
<td>
{{ check.0 }}
</td>
<td>
{{ check.3 }}
</td>
<td>
{% admin_boolean_icon check.1 %}
</td>
<td><a
href=
"{% documentation "
admin
/
install
"
check
.
2
%}"
>
{% trans "Documentation" %}
</a></td>
</tr>
...
...
weblate/trans/admin_views.py
View file @
d847d115
...
...
@@ -75,18 +75,21 @@ def performance(request):
_
(
'Debug mode'
),
not
settings
.
DEBUG
,
'production-debug'
,
settings
.
DEBUG
,
))
# Check for domain configuration
checks
.
append
((
_
(
'Site domain'
),
Site
.
objects
.
get_current
().
domain
not
in
DEFAULT_DOMAINS
,
'production-site'
,
Site
.
objects
.
get_current
().
domain
,
))
# Check database being used
checks
.
append
((
_
(
'Database backend'
),
"sqlite"
not
in
settings
.
DATABASES
[
'default'
][
'ENGINE'
],
'production-database'
,
settings
.
DATABASES
[
'default'
][
'ENGINE'
],
))
# Check configured admins
checks
.
append
((
...
...
@@ -94,6 +97,7 @@ def performance(request):
len
(
settings
.
ADMINS
)
>
0
or
'noreply@weblate.org'
in
[
x
[
1
]
for
x
in
settings
.
ADMINS
],
'production-admins'
,
u', '
.
join
([
x
[
1
]
for
x
in
settings
.
ADMINS
]),
))
# Check offloading indexing
checks
.
append
((
...
...
@@ -101,6 +105,7 @@ def performance(request):
_
(
'Indexing offloading'
),
appsettings
.
OFFLOAD_INDEXING
,
'production-indexing'
,
appsettings
.
OFFLOAD_INDEXING
))
if
appsettings
.
OFFLOAD_INDEXING
:
if
IndexUpdate
.
objects
.
count
()
<
20
:
...
...
@@ -115,6 +120,7 @@ def performance(request):
_
(
'Indexing offloading processing'
),
index_updates
,
'production-indexing'
,
IndexUpdate
.
objects
.
count
(),
))
# Check for sane caching
caches
=
settings
.
CACHES
[
'default'
][
'BACKEND'
].
split
(
'.'
)[
-
1
]
...
...
@@ -131,12 +137,15 @@ def performance(request):
_
(
'Django caching'
),
caches
,
'production-cache'
,
settings
.
CACHES
[
'default'
][
'BACKEND'
],
))
# Avatar caching
checks
.
append
((
_
(
'Avatar caching'
),
'avatar'
in
settings
.
CACHES
,
'production-cache-avatar'
,
settings
.
CACHES
[
'avatar'
][
'BACKEND'
]
if
'avatar'
in
settings
.
CACHES
else
''
,
))
# Check email setup
default_mails
=
(
...
...
@@ -151,37 +160,42 @@ def performance(request):
settings
.
DEFAULT_FROM_EMAIL
not
in
default_mails
),
'production-email'
,
', '
.
join
((
settings
.
SERVER_EMAIL
,
settings
.
DEFAULT_FROM_EMAIL
)),
))
# libravatar library
checks
.
append
((
_
(
'Federated avatar support'
),
HAS_LIBRAVATAR
,
'production-avatar'
,
HAS_LIBRAVATAR
,
))
# pyuca library
checks
.
append
((
_
(
'pyuca library'
),
HAS_PYUCA
,
'production-pyuca'
,
HAS_PYUCA
,
))
# Cookie signing key
checks
.
append
((
_
(
'Secret key'
),
settings
.
SECRET_KEY
!=
settings_example
.
SECRET_KEY
,
'production-secret'
,
settings
.
SECRET_KEY
,
))
# Allowed hosts
checks
.
append
((
_
(
'Allowed hosts'
),
len
(
settings
.
ALLOWED_HOSTS
)
>
0
,
'production-hosts'
,
', '
.
join
(
settings
.
ALLOWED_HOSTS
),
))
# Cached template loader
checks
.
append
((
_
(
'Cached template loader'
),
'cached.Loader'
in
settings
.
TEMPLATE_LOADERS
[
0
][
0
],
'production-templates'
'production-templates'
,
))
# Check for serving static files
...
...
@@ -190,6 +204,7 @@ def performance(request):
_
(
'Admin static files'
),
False
,
'production-admin-files'
,
''
,
'order-cell'
,
))
...
...
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