Files
invenio-theme-iform/invenio_theme_tugraz/ext.py
mb 0887cf59bc updated ext
removed Todo & unnecessary lines.
2020-07-30 10:32:26 +02:00

34 lines
900 B
Python

# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 mojib wali.
#
# invenio-theme-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""invenio module for TUGRAZ theme."""
from flask_babelex import gettext as _
from . import config
class inveniothemetugraz(object):
"""invenio-theme-tugraz extension."""
def __init__(self, app=None):
"""Extension initialization."""
if app:
self.init_app(app)
def init_app(self, app):
"""Flask application initialization."""
self.init_config(app)
app.extensions['invenio-theme-tugraz'] = self
def init_config(self, app):
"""Initialize configuration."""
for k in dir(config):
if k.startswith('INVENIO_THEME_TUGRAZ_'):
app.config.setdefault(k, getattr(config, k))