Move root directory into data/web
* rename root -> data/web: * setup.py: change install source path * wcs/root.ptl: add StaticDirectory controller to find static files.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 469 B |
2
setup.py
|
@ -33,7 +33,7 @@ setup(
|
|||
'wcs.qommon.vendor'],
|
||||
cmdclass = {'build_py': qx_build_py},
|
||||
scripts = ['wcsctl.py'],
|
||||
data_files = data_tree('share/wcs/web/', 'root/') + \
|
||||
data_files = data_tree('share/wcs/web/', 'data/web/') + \
|
||||
data_tree('share/wcs/themes/', 'data/themes/') + \
|
||||
data_tree('share/wcs/qommon/', 'wcs/qommon/static/')
|
||||
)
|
||||
|
|
|
@ -216,6 +216,8 @@ class RootDirectory(Directory):
|
|||
return forms.root.RootDirectory()._q_traverse(path)
|
||||
|
||||
def _q_lookup(self, component):
|
||||
if component in ('css','images'):
|
||||
return StaticDirectory(os.path.join(get_publisher().data_dir, 'web', component), follow_symlinks = True)
|
||||
if component == 'qo':
|
||||
dirname = os.path.join(get_publisher().data_dir, 'qommon')
|
||||
return StaticDirectory(dirname, follow_symlinks = True)
|
||||
|
|