Unbundle jquery from horizon using xstatic
Instead of bundling the jquery.js code with horizon, we use the xstatic and xstatic-jquery s dependencies that provide us with the packaged files. This patch partially implements blueprint remove-javascript-bundling Further patches will follow. Change-Id: I395f1c64f2341d4d6847d4f7e648d6c03eb85988
This commit is contained in:
parent
75a5f5f1f9
commit
802caf23d7
9789
horizon/static/horizon/lib/jquery/jquery.js
vendored
9789
horizon/static/horizon/lib/jquery/jquery.js
vendored
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,9 @@ import sys
|
||||
import django
|
||||
from django.utils import html_parser
|
||||
from horizon.test import patches
|
||||
import xstatic.main
|
||||
import xstatic.pkg.jquery
|
||||
|
||||
|
||||
# Patch django.utils.html_parser.HTMLParser as a workaround for bug 1273943
|
||||
if django.get_version() == '1.4' and sys.version_info[:3] > (2, 7, 3):
|
||||
@ -135,6 +138,10 @@ STATICFILES_FINDERS = (
|
||||
'compressor.finders.CompressorFinder',
|
||||
)
|
||||
|
||||
STATICFILES_DIRS = (
|
||||
('horizon/lib/jquery', xstatic.main.XStatic(xstatic.pkg.jquery).base_dir),
|
||||
)
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
|
@ -22,6 +22,8 @@ import sys
|
||||
import warnings
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import xstatic.main
|
||||
import xstatic.pkg.jquery
|
||||
|
||||
from openstack_dashboard import exceptions
|
||||
|
||||
@ -129,9 +131,14 @@ TEMPLATE_DIRS = (
|
||||
|
||||
STATICFILES_FINDERS = (
|
||||
'compressor.finders.CompressorFinder',
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
)
|
||||
|
||||
STATICFILES_DIRS = (
|
||||
('horizon/lib/jquery', xstatic.main.XStatic(xstatic.pkg.jquery).base_dir),
|
||||
)
|
||||
|
||||
COMPRESS_PRECOMPILERS = (
|
||||
('text/less', ('lesscpy {infile}')),
|
||||
)
|
||||
|
@ -24,3 +24,5 @@ python-swiftclient>=2.0.2
|
||||
python-troveclient>=1.0.4
|
||||
pytz>=2010h
|
||||
six>=1.7.0
|
||||
xstatic>=1.0.0
|
||||
xstatic-jquery>=1.10.2.1
|
||||
|
Loading…
Reference in New Issue
Block a user