Commit 5987a65b authored by Michal Čihař's avatar Michal Čihař

Implement static files check in python

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent db53dd4c
......@@ -25,7 +25,7 @@
</thead>
<tbody>
{% for check in checks %}
<tr class="row{% cycle '1' '2' %} {{ check.4 }}">
<tr class="row{% cycle '1' '2' %}">
<td>{{ check.0 }}</td>
<td>{{ check.3 }}</td>
<td>{% admin_boolean_icon check.1 %}</td>
......
......@@ -20,6 +20,8 @@
from __future__ import unicode_literals
import os.path
from django.contrib.sites.models import Site
from django.shortcuts import render
from django.contrib.admin.views.decorators import staff_member_required
......@@ -223,13 +225,14 @@ def performance(request):
))
# Check for serving static files
# This uses CSS magic to hide this check when CSS is properly loaded.
print os.path.join(settings.STATIC_ROOT, 'admin', 'js', 'core.jsx')
checks.append((
_('Admin static files'),
False,
os.path.exists(
os.path.join(settings.STATIC_ROOT, 'admin', 'js', 'core.js')
),
'production-admin-files',
'',
'order-cell',
settings.STATIC_ROOT,
))
context = admin_context(request)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment