Release 0.9.0
This commit is contained in:
15
bot/mixins/template.py
Normal file
15
bot/mixins/template.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from os import path, pardir
|
||||
import jinja2
|
||||
|
||||
|
||||
class Template(object):
|
||||
templates = object
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def import_templates(self):
|
||||
modules_root_dir = path.join(path.dirname(path.abspath(__file__)), pardir, "modules")
|
||||
modules_template_dir = path.join(modules_root_dir, self.options['module_name'], 'templates')
|
||||
file_loader = jinja2.FileSystemLoader(modules_template_dir)
|
||||
self.templates = jinja2.Environment(loader=file_loader)
|
||||
Reference in New Issue
Block a user