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

12 views
Skip to first unread message

Alon Nisser

unread,
Dec 19, 2012, 3:03:56 AM12/19/12
to sp...@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.. 

Alessandro Molina

unread,
Dec 19, 2012, 4:32:07 AM12/19/12
to sprox
Without the full traceback is not really easy do understand what's going wrong, but keep in mind that dojo support is not actually maintained and is going to be removed from TurboGears doc in the next release. So you might have found some issues with the dojo support. 

The sprox tutorial also is not much updated, you can find more recent tutorials on TGAdmin and CrudRestController at:




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

Reply all
Reply to author
Forward
0 new messages