knro / indiwebmanager

Web Manager for INDI Server
http://www.indilib.org
GNU Lesser General Public License v2.1
44 stars 35 forks source link

Fixing deprecation issue with absolute path templates. #65

Closed jrhuerta closed 4 days ago

jrhuerta commented 5 days ago

indiweb manager stopped working because templates can not be referenced with absolute paths anymore.

Traceback (most recent call last):
  File "/home/jrhuerta/Code/indiwebmanager/.venv/lib/python3.9/site-packages/bottle-0.13.2-py3.9.egg/EGG-INFO/scripts/bottle.py", line 995, in _handle
    out = route.call(**args)
  File "/home/jrhuerta/Code/indiwebmanager/.venv/lib/python3.9/site-packages/bottle-0.13.2-py3.9.egg/EGG-INFO/scripts/bottle.py", line 2025, in wrapper
    rv = callback(*a, **ka)
  File "/home/jrhuerta/Code/indiwebmanager/.venv/lib/python3.9/site-packages/indiweb-0.1.8-py3.9.egg/indiweb/main.py", line 142, in main_form
    return template(os.path.join(views_path, 'form.tpl'), profiles=profiles,
  File "/home/jrhuerta/Code/indiwebmanager/.venv/lib/python3.9/site-packages/bottle-0.13.2-py3.9.egg/EGG-INFO/scripts/bottle.py", line 4493, in template
    TEMPLATES[tplid] = adapter(name=tpl, lookup=lookup, **settings)
  File "/home/jrhuerta/Code/indiwebmanager/.venv/lib/python3.9/site-packages/bottle-0.13.2-py3.9.egg/EGG-INFO/scripts/bottle.py", line 4076, in __init__
    self.filename = self.search(self.name, self.lookup)
  File "/home/jrhuerta/Code/indiwebmanager/.venv/lib/python3.9/site-packages/bottle-0.13.2-py3.9.egg/EGG-INFO/scripts/bottle.py", line 4091, in search
    raise depr(0, 12, "Use of absolute path for template name.",
DeprecationWarning: Warning: Use of deprecated feature or API. (Deprecated in Bottle-0.12)
Cause: Use of absolute path for template name.
Fix: Refer to templates with names or paths relative to the lookup path.
knro commented 4 days ago

Thank you!