That would be really Great, Also It will be a great Idea to have Web2py Power decoupled from any Front End Framework, even as a separate project .
Is there some tutorial how to do it for those of us not so versed in CSS? If you just replace bootstrap.min.css in static/css the menus and forms do not work the way they used to in BS2.
Hi Anthony.I think that web2py grids are really powerful and useful. If web2py grids are not fully compatible with BS3 for me it's a problem. As websites must be generally designed now first for mobile devices, I think that web2py front end as to be done with BS3, and has to be responsive.
Thanks for the answer, I was aware of that completely. It is just that Massimo said that it is trivial to replace BS2 with BS3 yet when I try to do it the trivial way and then create a FORM in controller (whether it be simple form, sqlform or sqlform.factory) the form looks completely wrong. The same is with main menu.
Now I know that in this case I should create form in HTML using appropriate BS3 classes and then use that form in controller but I think you will agree that this takes away the ease of use which is one of the main strengths of web2py.
SQLFORM(..., formstyle='bootstrap3')
I suppose that was why OP named this thread "Bootstrap is killing web2py". I think a lot of web2py users (like myself) are novices in web programming and while it may be trivial for versed web programmer to use BS3 with web2py it is not the case for the beginners. BS3 is more than a year old but I still develop my web apps using BS2 because that is what ships with web2py. I don't want to criticize, web2py is an excellent framework but I think it needs to ship with BS3, otherwise it will lose a lot of novice programmers and I think novice programmers are important because those are the future user base of web2py.
Thanks for the answer, I was aware of that completely. It is just that Massimo said that it is trivial to replace BS2 with BS3 yet when I try to do it the trivial way and then create a FORM in controller (whether it be simple form, sqlform or sqlform.factory) the form looks completely wrong. The same is with main menu.
By trivial, I don't think Massimo meant to take templates with non-BS3 HTML structure and CSS classes and simply load the BS3 CSS file and expect to have everything work.
Now I know that in this case I should create form in HTML using appropriate BS3 classes and then use that form in controller but I think you will agree that this takes away the ease of use which is one of the main strengths of web2py.
First, web2py does include a BS3 formstyle, so you can simply do:
SQLFORM(..., formstyle='bootstrap3')
and assuming you have the BS3 CSS loaded, your forms should look fine.
More generally, though, web2py cannot cater to every CSS framework. Because Bootstrap is so popular, it is used for the scaffolding app, and there are built-in formstyles for BS2 and BS3. If you want to use another CSS framework, however, you can simply spend a few minutes writing a custom formstyle function, and then use that for all of your forms -- no need to write custom HTML in every form view.
I suppose that was why OP named this thread "Bootstrap is killing web2py". I think a lot of web2py users (like myself) are novices in web programming and while it may be trivial for versed web programmer to use BS3 with web2py it is not the case for the beginners. BS3 is more than a year old but I still develop my web apps using BS2 because that is what ships with web2py. I don't want to criticize, web2py is an excellent framework but I think it needs to ship with BS3, otherwise it will lose a lot of novice programmers and I think novice programmers are important because those are the future user base of web2py.
I agree that the scaffolding app should migrate to BS3, but this is a bit of an odd complaint. Most server side frameworks come with no scaffolding app at all. How could the lack of a BS3 scaffolding app be killing web2py if the alternatives don't offer one either? web2py certainly doesn't make it any harder to work with BS3 than any other framework, and in fact it is generally easier because web2py does include a BS3 formstyle and BS3 classes for the grid (most other frameworks don't even include a grid for that matter).
Of course it's easier if the scaffolding app already happens to be based on the CSS framework you want to use, but it really is not that difficult to take any front-end template you find and convert it to a web2py layout template, as described here. Just start with the HTML template and insert some of the web2py template code you see in the welcome layout.html, tweaked as needed. You might also keep some or all of web2py.css.
In any case, Massimo has distributed a BS3 version of the welcome app, though if you're not planning to make any layout/styling modifications anyway, it really won't be any different from using the BS2 version.
Anthony
--
meteorjs has a nice featureyou want bootstrap?just dometeor add boostrapinside your folder app and you are good to go.
Gael I'm using bootstrap 3 in several projects without any problem. The support for bootstrap 3 isn't stable (it might change) but it's really good enough already. The only concern with it is for SQLFORMs anyway and they already have the bootstrap3_stacked and bootstrap3_inline formstyles. I wouldn't worry about buying it I'm sure you can overcome any problems you have.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/9ipT2xkXMhc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
--
I am running the latest version of web2py and for some reason it will not let me load the w2p file in the admin interface under "upload and instal packed application".Anyone having this same issue?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
I agree with this post subject about bootstrap killing web2py, i use web2py in 4 different projects using CSS framewors like materialize, material design lite and material-ui and its really hard to use things like SQLFORM.smartgrid because it has the classes hardcoded, maybe this can be updated and made it fully configurable to allow it to be used with other CSS frameworks?.
ui = dict(widget='',
header='',
content='',
default='',
cornerall='',
cornertop='',
cornerbottom='',
button='button btn btn-default',
buttontext='buttontext button',
buttonadd='icon plus icon-plus glyphicon glyphicon-plus',
buttonback='icon leftarrow icon-arrow-left glyphicon glyphicon-arrow-left',
buttonexport='icon downarrow icon-download glyphicon glyphicon-download',
buttondelete='icon trash icon-trash glyphicon glyphicon-trash',
buttonedit='icon pen icon-pencil glyphicon glyphicon-pencil',
buttontable='icon rightarrow icon-arrow-right glyphicon glyphicon-arrow-right',
buttonview='icon magnifier icon-zoom-in glyphicon glyphicon-zoom-in',
)
table3cols, table2cols, divs, ul, bootstrap (2), bootstrap3_stacked, bootstrap3_inline, inline
as you can imagine this is turning into a maintenance nightmare. This is against the original spirit. This is why I believe we need a new approach to this problem and a new library for form generation.
Massimo
I am just starting to learn web2py and I want to better understand the issue. Is the issue simply that Bootstrap 3 is not backward compatible with v2.x and therefore we cannot use Bootstrap3 with the templates in web2py that have been created with Bootstrap 2 ?
The issue seems to be bigger than that because we would need to modify "all parts of web2py that are tightly bound to bootstrap", but what does this mean?
Of course, we expect a coupling between the view and the remainder of the code. The code has to provide data as expected in the view. There is no way this can be avoided, even in a loosely coupled framework. So, is this the only issue? I would like to know if there was a fundamental flaw in the design of web2py?