Polymer and SQLFORM

91 views
Skip to first unread message

Luis Valladares

unread,
Sep 20, 2015, 7:51:00 PM9/20/15
to web2py-users
Hello!

I'm building a web2py site and i want to use polymer as my front-end "framework", as you may know polymer uses web elements with custom html tags, i mean, a input is something can be something like

<my-custom-input type=string size=3></my-custom-input>

I want to integrate this "feature" with the web2py SQLFORM module, after a bit of research i came with this approach, im not sure if its correct so i accept suggestion:

i've to override all the FormWidget class inside sqlhtml.py and modify all widget to generate a HTML output adapted to my custom tags, also create a custom formstyle related to polymer and maybe (and this is one of the problems i've found) create some sort of custom HTML helper for generating the HTML custom tags.

I think i miss a lot of changes needed for this to work well, so i am looking for opinions in this matter, i'm correct in my planning, or maybe there is a easier path to join SQLFORM and Polymer, or may be better to work without SQLFORM?

Thank for any help you can provide

Niphlod

unread,
Sep 21, 2015, 8:30:10 AM9/21/15
to web2py-users
you should simply override widget defaults (according to your own formstyle.)
As for "HTML helpers" go for TAG, which can create whatever you may need without littering the global environment.

tse...@gmail.com

unread,
Apr 28, 2017, 10:13:30 AM4/28/17
to web2py-users
@Luis Valladares I also like the idea of Polymer + web2py. Where you able to use both in combination? If so - do you have some example code to share on Github?

Cheers
Tset

Luis Valladares

unread,
Apr 28, 2017, 10:48:11 AM4/28/17
to web2py-users

We choose to use materializecss instead of polymer because polymer was not very stable at the time.


--
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/15GvZ-M9WBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages