I am currently working on a simple webapp in Python using bottle frames . Here is my application structure:
Structure
lib
- bottle.py
- bottledaemon.py
- lockfile.py
- __init__.py
view
- dashboard.tpl
run.py
And here is my run.py code:
from lib.bottle import route, template, run, debug, request, static_file
from lib.bottledaemon import daemon_run
debug(mode=True)
@route('/')
def show_index():
return template('dashboard')
if __name__ == "__main__":
daemon_run()
So, I want the WSGI server to start in the daemon, passing it to the sample bottle script .
Problem
When you run the code, not demonized, it works. It shows me the correct template, and in the CLI I see HTTP requests.
However, when I run the same code in demonized mode, it runs as a daemon, so it works fine, but it can no longer find the template. This shows me this msg error:
Error: 500 Internal server error
, URL- ", --URL" :
"" .
, , .tpl , - . , , . ?
!