]> www.vanbest.org Git - motioneye-debian/commitdiff
remove base_path setting; all paths are now relative
authorCalin Crisan <ccrisan@gmail.com>
Sun, 28 May 2017 09:37:59 +0000 (12:37 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 28 May 2017 09:37:59 +0000 (12:37 +0300)
extra/motioneye.conf.sample
motioneye/meyectl.py
motioneye/server.py
motioneye/settings.py
motioneye/templates/base.html

index 0ae712099fb62917476c9a4a2550f61a9187cab8..a274d5a7540f8a1b9f8981b03ec8ceb1b794391e 100644 (file)
@@ -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
 
index e25b7751cf8e7f7025d8ce0f08b52e225bbac273..3d93bb8ce66dd2be75693fbc99c60f4aed210345 100755 (executable)
@@ -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
index 6aded3de166b791e976881315ae30688ce0101a9..12ea1bea0c62bea45328015bf448739aaba6daba 100644 (file)
@@ -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/')
index 15312242e16943ad5329b623ff71c45e9886a81c..cfd8488d4b49f5106feb06eb20a3012903443a27 100644 (file)
@@ -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'
 
index 252230de8e7aaed540da008f20aee5841a551e09..4eb7e50e395dacbbd4b9bb4d21c2ba1e8339dee7 100644 (file)
@@ -15,7 +15,7 @@
             <link rel="stylesheet" type="text/css" href="{{static_path}}css/jquery.timepicker.css" />
             <link rel="shortcut icon" href="{{static_path}}favicon.ico" />
             <link rel="apple-touch-icon" href="{{static_path}}favicon.ico" />
-            <link rel="manifest" href="{{base_path}}manifest.json" />
+            <link rel="manifest" href="manifest.json" />
         {% endblock %}
         {% block script %}
             <script type="text/javascript" src="{{static_path}}js/css-browser-selector.js"></script>