1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Added setting for using minified JS in production.

This commit is contained in:
Chris Church 2013-06-17 12:31:26 -04:00
parent 232c4f2391
commit 0dbb737f20
3 changed files with 7 additions and 1 deletions

View File

@ -148,6 +148,9 @@ REST_FRAMEWORK = {
),
}
# If set, serve only minified JS for UI.
USE_MINIFIED_JS = False
# Email address that error messages come from.
SERVER_EMAIL = 'root@localhost'

View File

@ -18,6 +18,9 @@ SECRET_KEY = None
# See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []
# Production should only use minified JS for UI.
USE_MINIFIED_JS = True
# If a local_settings.py file is present here, use it and ignore the global
# settings. Normally, local settings would only be present during development.
try:

View File

@ -14,7 +14,7 @@
<script src="{{ STATIC_URL }}lib/angular/angular.js"></script>
<script src="{{ STATIC_URL }}lib/angular/angular-resource.js"></script>
<script src="{{ STATIC_URL }}lib/angular/angular-cookies.js"></script>
{% if 0 and not settings.DEBUG %} {# FIXME: Change to use minified JS once we are building it. #}
{% if settings.USE_MINIFIED_JS %} {# FIXME: Change to use minified JS once we are building it. #}
<script src="{{ STATIC_URL }}js/ansibleworks-min.js"></script> <!-- FIXME: Change to whatever we end up calling the minified file. -->
{% else %}
<script src="{{ STATIC_URL }}js/app.js"></script>