Renamed static.py to staticfile.py

Python 3 supports 'namespace packages', and thus can see a directory
without __init__.py as something importable. This caused a name conflict,
since there were both the file static.py and the dir static.
This commit is contained in:
Sybren A. Stüvel 2017-03-03 12:01:38 +01:00
parent 7c055b5f56
commit b65dd49aa6
2 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ class PillarServer(Eve):
ext.static_path) ext.static_path)
def register_static_file_endpoint(self, url_prefix, endpoint_name, static_folder): def register_static_file_endpoint(self, url_prefix, endpoint_name, static_folder):
from pillar.web.static import PillarStaticFile from pillar.web.staticfile import PillarStaticFile
view_func = PillarStaticFile.as_view(endpoint_name, static_folder=static_folder) view_func = PillarStaticFile.as_view(endpoint_name, static_folder=static_folder)
self.add_url_rule('%s/<path:filename>' % url_prefix, view_func=view_func) self.add_url_rule('%s/<path:filename>' % url_prefix, view_func=view_func)