From: Calin Crisan Date: Sun, 28 May 2017 09:37:59 +0000 (+0300) Subject: remove base_path setting; all paths are now relative X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=5ec72dc95b8acfdea25e3a8e9e939f952c34bc3c;p=motioneye-debian remove base_path setting; all paths are now relative --- diff --git a/extra/motioneye.conf.sample b/extra/motioneye.conf.sample index 0ae7120..a274d5a 100644 --- a/extra/motioneye.conf.sample +++ b/extra/motioneye.conf.sample @@ -1,9 +1,4 @@ -# the base URL path at which motionEye lives -# change this if you run motionEye behind a reverse proxy (e.g. nginx), -# and you want to make motionEye accessible at a specific base path (e.g. /cams) -#base_path /cams - # path to the configuration directory (must be writable by motionEye) conf_path /etc/motioneye diff --git a/motioneye/meyectl.py b/motioneye/meyectl.py index e25b775..3d93bb8 100755 --- a/motioneye/meyectl.py +++ b/motioneye/meyectl.py @@ -131,7 +131,7 @@ def load_settings(): logging.fatal('failed to read settings from "%s": %s' % (config_file, e)) sys.exit(-1) - # use the config file directory as base path + # use the config file directory as base dir # if not specified otherwise in the config file base_dir = os.path.dirname(config_file) settings._config_file = config_file diff --git a/motioneye/server.py b/motioneye/server.py index 6aded3d..12ea1be 100644 --- a/motioneye/server.py +++ b/motioneye/server.py @@ -385,8 +385,7 @@ def run(): smbctl.start() logging.info('smb mounts started') - template.add_context('static_path', settings.BASE_PATH + '/static/') - template.add_context('base_path', settings.BASE_PATH + '/') + template.add_context('static_path', 'static/') application = Application(handler_mapping, debug=False, log_function=_log_request, static_path=settings.STATIC_PATH, static_url_prefix='/static/') diff --git a/motioneye/settings.py b/motioneye/settings.py index 1531224..cfd8488 100644 --- a/motioneye/settings.py +++ b/motioneye/settings.py @@ -16,11 +16,6 @@ TEMPLATE_PATH = os.path.join(PROJECT_PATH, 'templates') # the static files directory STATIC_PATH = os.path.join(PROJECT_PATH, 'static') -# static files (.css, .js etc) are served at this root url; -# change this if you run motionEye behind a reverse proxy (e.g. nginx), -# and you want static files to be served directly by it -BASE_PATH = '' - # path to the configuration directory (must be writable by motionEye) CONF_PATH = [sys.prefix, ''][sys.prefix == '/usr'] + '/etc/motioneye' diff --git a/motioneye/templates/base.html b/motioneye/templates/base.html index 252230d..4eb7e50 100644 --- a/motioneye/templates/base.html +++ b/motioneye/templates/base.html @@ -15,7 +15,7 @@ - + {% endblock %} {% block script %}