diff options
author | 2015-04-18 14:08:18 +0200 | |
---|---|---|
committer | 2015-04-18 14:08:18 +0200 | |
commit | 6e8f84e1dc06cff6fa9387559992f555182c1774 (patch) | |
tree | 476600f9896fae029880e4049eb4c5e6021b202d /pyload/webui/__init__.py | |
parent | fix: config cast (diff) | |
parent | Spare code cosmetics (5) (diff) | |
download | pyload-6e8f84e1dc06cff6fa9387559992f555182c1774.tar.xz |
Merge pull request #3 from vuolter/0.4.10
merge vuolter HEAD
Diffstat (limited to 'pyload/webui/__init__.py')
-rw-r--r-- | pyload/webui/__init__.py | 23 |
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) |