summaryrefslogtreecommitdiffstats
path: root/pyload/webui/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/webui/__init__.py')
-rw-r--r--pyload/webui/__init__.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/pyload/webui/__init__.py b/pyload/webui/__init__.py
index d965db3a0..841e5abd9 100644
--- a/pyload/webui/__init__.py
+++ b/pyload/webui/__init__.py
@@ -65,19 +65,19 @@ env = Environment(loader=loader, extensions=['jinja2.ext.i18n', 'jinja2.ext.auto
from filters import quotepath, path_make_relative, path_make_absolute, truncate, date
-env.filters["quotepath"] = quotepath
-env.filters["truncate"] = truncate
-env.filters["date"] = date
-env.filters["path_make_relative"] = path_make_relative
-env.filters["path_make_absolute"] = path_make_absolute
-env.filters["decode"] = decode
-env.filters["type"] = lambda x: str(type(x))
-env.filters["formatsize"] = formatSize
-env.filters["getitem"] = lambda x, y: x.__getitem__(y)
+env.filters['quotepath'] = quotepath
+env.filters['truncate'] = truncate
+env.filters['date'] = date
+env.filters['path_make_relative'] = path_make_relative
+env.filters['path_make_absolute'] = path_make_absolute
+env.filters['decode'] = decode
+env.filters['type'] = lambda x: str(type(x))
+env.filters['formatsize'] = formatSize
+env.filters['getitem'] = lambda x, y: x.__getitem__(y)
if PREFIX:
- env.filters["url"] = lambda x: x
+ env.filters['url'] = lambda x: x
else:
- env.filters["url"] = lambda x: PREFIX + x if x.startswith("/") else x
+ env.filters['url'] = lambda x: PREFIX + x if x.startswith("/") else x
gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None])
translation = gettext.translation("django", join(PYLOAD_DIR, "locale"),
@@ -102,6 +102,7 @@ if PREFIX:
import pyload.webui.app
+
def run_simple(host="0.0.0.0", port="8000"):
run(app=web, host=host, port=port, quiet=True)