带蓝图的 web2py

发布于 2025-01-04 20:41:37 字数 155 浏览 1 评论 0原文

将蓝图与 web2py 一起使用是常见还是推荐?蓝图与默认的web2py样式表和layout.html冲突吗?在 web2py 应用程序中包含蓝图的正确方法是什么?

我认为应该将蓝图目录添加到 static/css 目录中,并将推荐链接添加到该部分中的layout.html 中。

Is using blueprint with web2py common or recommended? Does blueprint conflict with the default web2py stylesheets and layout.html? What is the correct way to include blueprint in a web2py application?

I presume the blueprint directory should be added to static/css directory and the recommended links added to the layout.html in the section.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苦妄 2025-01-11 20:41:37

将蓝图与 web2py 一起使用是否常见或推荐?

web2py 主要涉及服务器端,因此您可以在客户端使用任何您想要的 CSS、JS 等。

蓝图与默认的web2py样式表和layout.html冲突吗?

请注意,您根本不必使用 web2py 的默认样式表或layout.html。当前的 web2py“welcome”应用程序基于 Skeleton 框架,因此您可能需要删除 skeletal.css 和更改布局以适应蓝图网格(假设您想使用蓝图的网格)。您也可以不使用大部分 web2py.css,尽管可能有一些项目值得保留。无论如何,如果您在 web2py.css 之后加载蓝图,它应该覆盖任何可能发生冲突的内容。

在layout.html中,您可能需要保留{{include 'web2py_ajax.html'}},也许还有response.flash、auth.navbar()和response.menu,具体取决于您的需要。

在 web2py 应用程序中包含蓝图的正确方法是什么?

我认为应该将blueprint目录添加到static/css目录中,并将推荐链接添加到该部分中的layout.html中。

是的。

Is using blueprint with web2py common or recommended?

web2py is primarily concerned with the server side, so you can use whatever you want on the client side in terms of CSS, JS, etc.

Does blueprint conflict with the default web2py stylesheets and layout.html?

Note, you don't have to use web2py's default stylesheets or layout.html at all. The current web2py "welcome" app is based on the Skeleton framework, so you may want to remove skeleton.css and change the layout to accommodate the Blueprint grid (assuming you want to use Blueprint's grid). You can probably also do without most of web2py.css, though there may be a few items worth keeping. Anyway, if you load Blueprint after web2py.css, it should override anything that would conflict.

From layout.html, you'll probably want to keep {{include 'web2py_ajax.html'}}, and maybe response.flash, auth.navbar(), and response.menu, depending on your needs.

What is the correct way to include blueprint in a web2py application?

I presume the blueprint directory should be added to static/css directory and the recommended links added to the layout.html in the section.

Yes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文