【问题标题】:Bottle python web framework ,style sheet is not referenced in templateBottle python web框架,模板中未引用样式表
【发布时间】:2017-04-19 19:50:16
【问题描述】:
  1. 我有两个来自bottle python web 框架的问题

    问题1.在我的网站http://localhost:8080/home

    我正在通过浏览按钮浏览以获取 excel 文件。我将处理 excel文件我想以相同的方式显示数据 http://localhost:8080/home页面。

    但是当我谷歌时,他们要求我创建模板。

    我们是否只能选择模板或任何可能 显示在同一个主页

    问题 2:

    我创建了模板文件并能够在模板中显示结果,但是 i 样式表没有反映在模板中。

    我试过href =/static/style.css 我试过href =/app/static/style.css 我试过像 URL get_url('static',

    谢谢玛尼。

【问题讨论】:

    标签: python bottle


    【解决方案1】:

    好吧,如果你要渲染任何东西,你肯定需要一个模板。当然,您可以灵活地创建此模板,但这取决于您。 说到第二个问题,url应该用引号引起来。 Compare

    【讨论】:

    • 谢谢 gonczor。我知道在bottle web框架中,我们不能在html文件中显示输出,而是需要在模板文件中显示。
    猜你喜欢
    • 2013-04-16
    • 2014-12-25
    • 2012-07-02
    • 1970-01-01
    • 2015-06-27
    • 2012-10-14
    • 2013-01-13
    • 1970-01-01
    • 2013-06-19
    相关资源
    最近更新 更多