fix: allow template loading without the web server
See https://git.vvvvvvaria.org/decentral1se/xbotlib/issues/12
This commit is contained in:
parent
f8377d8023
commit
6788e6a4f1
|
@ -258,6 +258,7 @@ easily template and generate HTML. The web server is provided by
|
|||
|
||||
The default template search path is `index.html.j2` in the current working
|
||||
directory. This can be configured through the usual configuration entrypoints.
|
||||
It is possible to use the template without the built-in server too!
|
||||
|
||||
Here's a small example that renders a random ASCII letter and uses a stylesheet.
|
||||
|
||||
|
|
|
@ -490,11 +490,7 @@ class Bot(ClientXMPP):
|
|||
self.no_auto_join = no_auto_join
|
||||
self.port = port
|
||||
self.serve_web = serve_web
|
||||
|
||||
self.template = None
|
||||
if self.serve_web:
|
||||
self.template = self.load_template(template)
|
||||
|
||||
self.template = self.load_template(template)
|
||||
self.storage = storage
|
||||
self.output = Path(output).absolute()
|
||||
|
||||
|
|
Loading…
Reference in New Issue