trying to add sprox.dojo support to admin controller and getting a TypeError: Sorry, your collection type is not supported by the paginate module. You can provide a list, a tuple, a SQLAlchemy " Error

12 views
Skip to first unread message

alonn

unread,
Dec 19, 2012, 2:29:57 AM12/19/12
to turbo...@googlegroups.com
TypeError: Sorry, your collection type is not supported by the paginate module. You can provide a list, a tuple, a SQLAlchemy " "select object or a SQLAlchemy ORM-query object

Following the http://www.sprox.org/tutorials/table.html#adding-dojo-to-the-mix tutorial

using tg 2.1.4

the code:
from tgext.admin.tgadminconfig import TGAdminConfig, CrudRestControllerConfig
from sprox.dojo.tablebase import DojoTableBase
from sprox.dojo.fillerbase import DojoTableFiller

class MyAdminConfig(TGAdminConfig):  # overridding the default Time_stamp look
    class time_stamp(CrudRestControllerConfig):
        class table_type(DojoTableBase):
            __entity__ = Time_stamp
            __limit_fields__ = ['stamp', 'timestamp']
            __headers__ = {'timestamp': u"מועד משיכה אחרון", 'stamp': u"סוג משיכה", 'actions': u"פעולות"}
            __column_widths__ = {'timestamp': "7em",
                                 'stamp': "5em"}


        class table_filler_type(DojoTableFiller):
            __entity__ = Time_stamp
            __limit_fields__ = ['id', 'stamp', 'timestamp']
            #__url__ = "/time_stamps.json"

and after that:

admin = AdminController([User, Group, Permission, ErrorLog, Time_stamp], DBSession, config_type=MyAdminConfig)

I'll be glad for any help with this. trying to find my way in using tg admin to do something usefull.. 


Message has been deleted
Message has been deleted

Alessandro Molina

unread,
Dec 19, 2012, 4:36:51 AM12/19/12
to TurboGears .
Already answered on sprox Group, Dojo support is not much supported anymore, tw.dojo stopped working more than an year ago and so it got removed from TGAdmin.
Future TurboGears documentation won't cover dojo support anymore, if anyone is interested in adding dojo support back again that is something that better suites an extension than the framework itself.


--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To view this discussion on the web visit https://groups.google.com/d/msg/turbogears/-/ZtDPch8sfLcJ.
To post to this group, send email to turbo...@googlegroups.com.
To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

alonn

unread,
Dec 19, 2012, 5:02:42 PM12/19/12
to turbo...@googlegroups.com
thanks
Reply all
Reply to author
Forward
0 new messages