SQLEDITABLE plugin

180 views
Skip to first unread message

kato

unread,
Jul 1, 2014, 9:12:29 AM7/1/14
to web...@googlegroups.com
Hi.

I tried to make SQLEDITABLE plugin.


It is similar as gluon/contrib/spreadsheet. But, it is easy to use more.
If you are interested, please try.

Thanks.

Simon Ashley

unread,
Jul 1, 2014, 6:00:20 PM7/1/14
to web...@googlegroups.com
+1. Very nice work. Thanks you for sharing

Fabiano Almeida

unread,
Jul 1, 2014, 7:00:07 PM7/1/14
to web...@googlegroups.com
Very Nice!

Thank you very much!


--
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.
For more options, visit https://groups.google.com/d/optout.

JorgeH

unread,
Jul 1, 2014, 7:35:06 PM7/1/14
to web...@googlegroups.com

Cool!!

Great work

kato

unread,
Jul 2, 2014, 6:40:26 PM7/2/14
to web...@googlegroups.com
Hi all.

Thank you for your quick reply.

kato

2014年7月1日火曜日 20時35分06秒 UTC-3 JorgeH:

Fabiano Almeida

unread,
Jul 6, 2014, 2:19:04 PM7/6/14
to web...@googlegroups.com
Hi kato!

How to use SQLEDITABLE with a query?

If I try this in your first example:

    query = db.employee_sheet.resigned == True
    editable = SQLEDITABLE(query, showid=False, maxrow=5).process()

Return error:

AttributeError: 'Query' object has no attribute '_id'
How to filter table?

Thanks,

Fabiano



2014-07-01 10:12 GMT-03:00 'kato' via web2py-users <web...@googlegroups.com>:

--

kato

unread,
Jul 7, 2014, 4:51:26 AM7/7/14
to web...@googlegroups.com
Hi fabiano.

It is not possible to pass a query currently. 
But "record" parameter is so callable, please set there. 
Please see to the demo5 .

thanks.

2014年7月6日日曜日 15時19分04秒 UTC-3 Fabiano Almeida:

kato

unread,
Jul 7, 2014, 1:19:33 PM7/7/14
to web...@googlegroups.com
I will add a postscript. you can write as below.

def demo031():
    def record():
        rows = db(db.employee_sheet.resigned == True).select(limitby=(0,3))
        return [row.id for row in rows.sort(lambda row:row.employee_number)]
        
    response.title = 'demo030'
    response.view = 'plugin_sqleditable/sample.html'
    editable = SQLEDITABLE(db.employee_sheet, record=record(),showid=False, 
                                                            maxrow=5).process()
    return dict(editable=editable)

If you use "primarykey" and multiple key fields, you need to write list of list in "record" parameter.


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/PQE1JJwv0Bc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Fabiano Almeida

unread,
Jul 7, 2014, 4:49:37 PM7/7/14
to web...@googlegroups.com
Thanks Kato!!!

Now I get it!!
Reply all
Reply to author
Forward
0 new messages