如何构建瓶子大型应用程序

时间:2015-10-06 09:16:01

标签: python bottle

在Flask中,我可以调用blueprint函数来构建我的应用程序。

我想做以下事情:

app/
    __init__.py
    admin/
        __init__.py
        views.py
        static/
        templates/
    home/
        __init__.py
        views.py
        static/
        templates/
    control_panel/
        __init__.py
        views.py
        static/
        templates/
    models.py

在瓶子里,我该怎么办?

1 个答案:

答案 0 :(得分:0)

在每个路径中使用app=bottle.defaultapp()。在您的主应用程序中导入所有路由功能。