Mercurial > libervia-web
comparison libervia/web/server/server.py @ 1522:a44f77559279
installation: moved from `setup.py` to `pyproject.toml`:
- following backend change, installation is now using `pyproject.toml`, and legacy
`setup.py` as well as other legacy files have been deleted/updated.
- [hatch](https://hatch.pypa.io) is now used as main building tool. However, thanks to the
use of standards, other tools can be used too.
- `VERSION` file has been deleted, in favor or using directly `__version__`, in
`libervia/web/__init__.py`. Version can be updated directly from Hatch
- update .hgignore
- several dependencies version bump, with code update to adapt to changes.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 07 Jun 2023 15:28:10 +0200 |
parents | 01b8d68edd70 |
children | e47c24204449 |
comparison
equal
deleted
inserted
replaced
1521:0d517b596568 | 1522:a44f77559279 |
---|---|
293 self.ns_map = {str(k): str(v) for k,v in ns_map.items()} | 293 self.ns_map = {str(k): str(v) for k,v in ns_map.items()} |
294 | 294 |
295 def _namespaces_get_eb(self, failure_): | 295 def _namespaces_get_eb(self, failure_): |
296 log.error(_("Can't get namespaces map: {msg}").format(msg=failure_)) | 296 log.error(_("Can't get namespaces map: {msg}").format(msg=failure_)) |
297 | 297 |
298 @template.contextfilter | 298 @template.pass_context |
299 def _front_url_filter(self, ctx, relative_url): | 299 def _front_url_filter(self, ctx, relative_url): |
300 template_data = ctx['template_data'] | 300 template_data = ctx['template_data'] |
301 return os.path.join( | 301 return os.path.join( |
302 '/', C.TPL_RESOURCE, template_data.site or C.SITE_NAME_DEFAULT, | 302 '/', C.TPL_RESOURCE, template_data.site or C.SITE_NAME_DEFAULT, |
303 C.TEMPLATE_TPL_DIR, template_data.theme, relative_url) | 303 C.TEMPLATE_TPL_DIR, template_data.theme, relative_url) |