4 |
4 |
5 NOTE: This patch is applied AFTER gmake install has completed rather |
5 NOTE: This patch is applied AFTER gmake install has completed rather |
6 than during gmake prep. We need the xstatic functionality to collect |
6 than during gmake prep. We need the xstatic functionality to collect |
7 all the JavaScript libraries before packaging. |
7 all the JavaScript libraries before packaging. |
8 |
8 |
9 --- a/usr/lib/python2.7/vendor-packages/openstack_dashboard/settings.py 2015-01-13 10:40:30.930622964 -0700 |
9 --- /usr/lib/python2.7/vendor-packages/openstack_dashboard/static_settings.py.orig 2015-05-04 16:35:35.859239557 -0600 |
10 +++ b/usr/lib/python2.7/vendor-packages/openstack_dashboard/settings.py 2015-01-13 10:40:57.470743881 -0700 |
10 +++ /usr/lib/python2.7/vendor-packages/openstack_dashboard/static_settings.py 2015-05-04 16:35:58.697407748 -0600 |
11 @@ -22,21 +22,6 @@ import sys |
11 @@ -17,99 +17,5 @@ distributions can edit or replace this f |
12 import warnings |
12 to match their distribution's standards. |
|
13 """ |
13 |
14 |
14 from django.utils.translation import ugettext_lazy as _ |
|
15 -import xstatic.main |
15 -import xstatic.main |
16 -import xstatic.pkg.angular |
16 -import xstatic.pkg.angular |
|
17 -import xstatic.pkg.angular_bootstrap |
|
18 -import xstatic.pkg.angular_lrdragndrop |
|
19 -import xstatic.pkg.angular_smart_table |
17 -import xstatic.pkg.bootstrap_datepicker |
20 -import xstatic.pkg.bootstrap_datepicker |
18 -import xstatic.pkg.bootstrap_scss |
21 -import xstatic.pkg.bootstrap_scss |
19 -import xstatic.pkg.d3 |
22 -import xstatic.pkg.d3 |
20 -import xstatic.pkg.font_awesome |
23 -import xstatic.pkg.font_awesome |
21 -import xstatic.pkg.hogan |
24 -import xstatic.pkg.hogan |
23 -import xstatic.pkg.jquery_migrate |
26 -import xstatic.pkg.jquery_migrate |
24 -import xstatic.pkg.jquery_quicksearch |
27 -import xstatic.pkg.jquery_quicksearch |
25 -import xstatic.pkg.jquery_tablesorter |
28 -import xstatic.pkg.jquery_tablesorter |
26 -import xstatic.pkg.jquery_ui |
29 -import xstatic.pkg.jquery_ui |
27 -import xstatic.pkg.jsencrypt |
30 -import xstatic.pkg.jsencrypt |
|
31 -import xstatic.pkg.magic_search |
28 -import xstatic.pkg.rickshaw |
32 -import xstatic.pkg.rickshaw |
29 -import xstatic.pkg.spin |
33 -import xstatic.pkg.spin |
30 |
34 -import xstatic.pkg.termjs |
31 from openstack_dashboard import exceptions |
|
32 |
|
33 @@ -148,45 +133,6 @@ STATICFILES_FINDERS = ( |
|
34 'compressor.finders.CompressorFinder', |
|
35 ) |
|
36 |
|
37 -STATICFILES_DIRS = [ |
|
38 - ('horizon/lib/angular', |
|
39 - xstatic.main.XStatic(xstatic.pkg.angular).base_dir), |
|
40 - ('horizon/lib/bootstrap_datepicker', |
|
41 - xstatic.main.XStatic(xstatic.pkg.bootstrap_datepicker).base_dir), |
|
42 - ('bootstrap', |
|
43 - xstatic.main.XStatic(xstatic.pkg.bootstrap_scss).base_dir), |
|
44 - ('horizon/lib', |
|
45 - xstatic.main.XStatic(xstatic.pkg.d3).base_dir), |
|
46 - ('horizon/lib', |
|
47 - xstatic.main.XStatic(xstatic.pkg.hogan).base_dir), |
|
48 - ('horizon/lib/font-awesome', |
|
49 - xstatic.main.XStatic(xstatic.pkg.font_awesome).base_dir), |
|
50 - ('horizon/lib/jquery', |
|
51 - xstatic.main.XStatic(xstatic.pkg.jquery).base_dir), |
|
52 - ('horizon/lib/jquery', |
|
53 - xstatic.main.XStatic(xstatic.pkg.jquery_migrate).base_dir), |
|
54 - ('horizon/lib/jquery', |
|
55 - xstatic.main.XStatic(xstatic.pkg.jquery_quicksearch).base_dir), |
|
56 - ('horizon/lib/jquery', |
|
57 - xstatic.main.XStatic(xstatic.pkg.jquery_tablesorter).base_dir), |
|
58 - ('horizon/lib/jsencrypt', |
|
59 - xstatic.main.XStatic(xstatic.pkg.jsencrypt).base_dir), |
|
60 - ('horizon/lib', |
|
61 - xstatic.main.XStatic(xstatic.pkg.rickshaw).base_dir), |
|
62 - ('horizon/lib', |
|
63 - xstatic.main.XStatic(xstatic.pkg.spin).base_dir), |
|
64 -] |
|
65 - |
35 - |
66 - |
36 - |
67 -if xstatic.main.XStatic(xstatic.pkg.jquery_ui).version.startswith('1.10.'): |
37 def get_staticfiles_dirs(webroot='/'): |
68 - # The 1.10.x versions already contain the 'ui' directory. |
38 - STATICFILES_DIRS = [ |
69 - STATICFILES_DIRS.append(('horizon/lib/jquery-ui', |
39 - ('horizon/lib/angular', |
70 - xstatic.main.XStatic(xstatic.pkg.jquery_ui).base_dir)) |
40 - xstatic.main.XStatic(xstatic.pkg.angular, |
71 -else: |
41 - root_url=webroot).base_dir), |
72 - # Newer versions dropped the directory, add it to keep the path the same. |
42 - ('horizon/lib/angular', |
73 - STATICFILES_DIRS.append(('horizon/lib/jquery-ui/ui', |
43 - xstatic.main.XStatic(xstatic.pkg.angular_bootstrap, |
74 - xstatic.main.XStatic(xstatic.pkg.jquery_ui).base_dir)) |
44 - root_url=webroot).base_dir), |
|
45 - ('horizon/lib/angular', |
|
46 - xstatic.main.XStatic(xstatic.pkg.angular_lrdragndrop, |
|
47 - root_url=webroot).base_dir), |
|
48 - ('horizon/lib/angular', |
|
49 - xstatic.main.XStatic(xstatic.pkg.angular_smart_table, |
|
50 - root_url=webroot).base_dir), |
|
51 - ('horizon/lib/bootstrap_datepicker', |
|
52 - xstatic.main.XStatic(xstatic.pkg.bootstrap_datepicker, |
|
53 - root_url=webroot).base_dir), |
|
54 - ('bootstrap', |
|
55 - xstatic.main.XStatic(xstatic.pkg.bootstrap_scss, |
|
56 - root_url=webroot).base_dir), |
|
57 - ('horizon/lib', |
|
58 - xstatic.main.XStatic(xstatic.pkg.d3, |
|
59 - root_url=webroot).base_dir), |
|
60 - ('horizon/lib', |
|
61 - xstatic.main.XStatic(xstatic.pkg.hogan, |
|
62 - root_url=webroot).base_dir), |
|
63 - ('horizon/lib/font-awesome', |
|
64 - xstatic.main.XStatic(xstatic.pkg.font_awesome, |
|
65 - root_url=webroot).base_dir), |
|
66 - ('horizon/lib/jquery', |
|
67 - xstatic.main.XStatic(xstatic.pkg.jquery, |
|
68 - root_url=webroot).base_dir), |
|
69 - ('horizon/lib/jquery', |
|
70 - xstatic.main.XStatic(xstatic.pkg.jquery_migrate, |
|
71 - root_url=webroot).base_dir), |
|
72 - ('horizon/lib/jquery', |
|
73 - xstatic.main.XStatic(xstatic.pkg.jquery_quicksearch, |
|
74 - root_url=webroot).base_dir), |
|
75 - ('horizon/lib/jquery', |
|
76 - xstatic.main.XStatic(xstatic.pkg.jquery_tablesorter, |
|
77 - root_url=webroot).base_dir), |
|
78 - ('horizon/lib/jsencrypt', |
|
79 - xstatic.main.XStatic(xstatic.pkg.jsencrypt, |
|
80 - root_url=webroot).base_dir), |
|
81 - ('horizon/lib/magic_search', |
|
82 - xstatic.main.XStatic(xstatic.pkg.magic_search, |
|
83 - root_url=webroot).base_dir), |
|
84 - ('horizon/lib', |
|
85 - xstatic.main.XStatic(xstatic.pkg.rickshaw, |
|
86 - root_url=webroot).base_dir), |
|
87 - ('horizon/lib', |
|
88 - xstatic.main.XStatic(xstatic.pkg.spin, |
|
89 - root_url=webroot).base_dir), |
|
90 - ('horizon/lib', |
|
91 - xstatic.main.XStatic(xstatic.pkg.termjs, |
|
92 - root_url=webroot).base_dir), |
|
93 - ] |
75 - |
94 - |
76 COMPRESS_PRECOMPILERS = ( |
95 - if xstatic.main.XStatic(xstatic.pkg.jquery_ui, |
77 ('text/scss', 'django_pyscss.compressor.DjangoScssFilter'), |
96 - root_url=webroot).version.startswith('1.10.'): |
78 ) |
97 - # The 1.10.x versions already contain the 'ui' directory. |
|
98 - STATICFILES_DIRS.append( |
|
99 - ('horizon/lib/jquery-ui', |
|
100 - xstatic.main.XStatic(xstatic.pkg.jquery_ui, |
|
101 - root_url=webroot).base_dir)) |
|
102 - else: |
|
103 - # Newer versions dropped the directory, add it to keep the path the |
|
104 - # same. |
|
105 - STATICFILES_DIRS.append( |
|
106 - ('horizon/lib/jquery-ui/ui', |
|
107 - xstatic.main.XStatic(xstatic.pkg.jquery_ui, |
|
108 - root_url=webroot).base_dir)) |
|
109 - |
|
110 - return STATICFILES_DIRS |
|
111 + return [] |