def __init__(self, name, import_name, template_folder=None): self.name = name self.root_path = get_root_path(import_name) self.import_name = import_name self.template_folder = template_folder self.runswith = runswith if runswith == "flask": self.flask_blueprint = None else: self.athana_files = {} self.athana_context = None
def __init__(self, import_name, template_folder="templates", **config): if "DEBUG" not in config: config["DEBUG"] = True self.blueprints = {} self.config = config.copy() self.extensions = {} self.template_folder = template_folder self.jinja_env = self.create_jinja_environment() self.import_name = import_name self.root_path = get_root_path(import_name) #: A dictionary with list of functions that are called without argument #: to populate the template context. The key of the dictionary is the #: name of the blueprint this function is active for, `None` for all #: requests. Each returns a dictionary that the template context is #: updated with. To register a function here, use the #: :meth:`context_processor` decorator. self.template_context_processors = { None: [] }