# Path: modules/bottle_gettext.py
# class GettextPlugin(object):
#     def __init__(self, domain, localedir, allowed_languages, keyword='lang'):
#     def get_language(self):
#     def apply(self, callback, route):
#         def wrapper(*args, **kwargs):
# 
# Path: api/app.py
# class OsmoseAPIBottle(bottle.Bottle):
#     def default_error_handler(self, res):


import bottle
import os.path
import functools
import os
import modules.osmose_bottle
from modules import utils
from modules import bottle_gettext
from web_api import app as web_app
from control import app as control_app
from api import app as api_app
###########################################################################
##                                                                       ##
## Copyrights Frederic Rodrigo 2020                                      ##
##                                                                       ##
## This program is free software: you can redistribute it and/or modify  ##
## it under the terms of the GNU General Public License as published by  ##
## the Free Software Foundation, either version 3 of the License, or     ##
## (at your option) any later version.                                   ##
##                                                                       ##
## This program is distributed in the hope that it will be useful,       ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of        ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         ##
## GNU General Public License for more details.                          ##
##                                                                       ##
## You should have received a copy of the GNU General Public License     ##
## along with this program.  If not, see <http://www.gnu.org/licenses/>. ##
##                                                                       ##
###########################################################################


bottle.TEMPLATE_PATH.insert(0, './web_api/views/')


app = bottle.default_app()

####### Monkey patch bootle 0.12 - To be removed on 0.13
# https://github.com/bottlepy/bottle/issues/602#issuecomment-591434275
def pathinfo_adjust_wrapper(func):
    # A wrapper for _handle() method
    @functools.wraps(func)

# Path: modules/bottle_gettext.py
# class GettextPlugin(object):
#     def __init__(self, domain, localedir, allowed_languages, keyword='lang'):
#     def get_language(self):
#     def apply(self, callback, route):
#         def wrapper(*args, **kwargs):
# 
# Path: api/app.py
# class OsmoseAPIBottle(bottle.Bottle):
#     def default_error_handler(self, res):


# Path: osmose.py
import bottle
import os.path
import functools
import os
import modules.osmose_bottle
from modules import utils
from modules import bottle_gettext
from web_api import app as web_app
from control import app as control_app
from api import app as api_app

###########################################################################
##                                                                       ##
## Copyrights Frederic Rodrigo 2020                                      ##
##                                                                       ##
## This program is free software: you can redistribute it and/or modify  ##
## it under the terms of the GNU General Public License as published by  ##
## the Free Software Foundation, either version 3 of the License, or     ##
## (at your option) any later version.                                   ##
##                                                                       ##
## This program is distributed in the hope that it will be useful,       ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of        ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         ##
## GNU General Public License for more details.                          ##
##                                                                       ##
## You should have received a copy of the GNU General Public License     ##
## along with this program.  If not, see <http://www.gnu.org/licenses/>. ##
##                                                                       ##
###########################################################################


bottle.TEMPLATE_PATH.insert(0, './web_api/views/')


app = bottle.default_app()

####### Monkey patch bootle 0.12 - To be removed on 0.13
# https://github.com/bottlepy/bottle/issues/602#issuecomment-591434275
def pathinfo_adjust_wrapper(func):
    # A wrapper for _handle() method
    @functools.wraps(func)

    def _(environ):