Search code examples
web2pyblueprint-css

web2py with blueprint


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.


Solution

  • 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.