--
---
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.
For more options, visit https://groups.google.com/groups/opt_out.
Unfortunately bs3 has dropped some components used by web2py, for example submenus, has changed many classes and so on. In other words it's a different framework that requires changes in web2py code which - currently- infringe the backward compatibility. Moreover IE7 and FF3.6 aren't supported anymore. Of course it's possible create customized html layouts based on bs3 but I don't think that web2py can apply for default this new framework.
Anthony you are right about the scaffolding, But currently, web2py renders forms with formstyle="bootstrap" which have css classes not used anymore in bs3.
from gluon.contrib.formstyle import bootstrap3
form = SQLFORM(..., formstyle=bootstrap3)
indeed we have ....
https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L760
the external contrib module was exactly what I proposed to @massimo, but by the time we were discussing, a new release was issued (I seem to remember it was around the time of 2.0.x).
@AnthonyI never said that the scaffolding can't change, I said that web2py currently can't apply bs3 per default without to change some core code but your and Niphlod solutions have cleared my doubts.
BTW, a nice thing to have would be a global default formstyle that propagates to all SQLFORM-related serializations.
SQLFORM.formstyles.table3cols = SQLFORM.formstyles.bootstrap
SQLFORM.formstyles.table3cols = my_custom_formstyle
I'm not sure we should have created a formstyle called "boostrap", though. Instead, we should probably put a formstyle.py in contrib that includes several custom formstyles, including ones for Bootstrap 2 and Bootstrap 3. Then you would do:
from gluon.contrib.formstyle import bootstrap3
form = SQLFORM(..., formstyle=bootstrap3)
I'm not sure we should have created a formstyle called "boostrap", though. Instead, we should probably put a formstyle.py in contrib that includes several custom formstyles, including ones for Bootstrap 2 and Bootstrap 3. Then you would do:
from gluon.contrib.formstyle import bootstrap3
form = SQLFORM(..., formstyle=bootstrap3)
I think this should be the way to go.
But it will not be enough, for example, I'm using bootstrap3 with web2py in my personal feed reader/aggregator
(you can check here http://feeds.uni.me/)and if you go to the register form, the "Verify Password" field doesn't pass through the custom formstyle, we will have
to do some css, js or server side dom manipulation, if we want to style this fields (that feels a little bit hacky, for me).