No Delete action in sprox table in default admincontroller

42 views
Skip to first unread message

alonn

unread,
Aug 6, 2012, 1:16:57 PM8/6/12
to turbo...@googlegroups.com
I need a delete action in a table view in the defaultadmincontroller. I thought that was default behavior but for some reason I'm not getting it. tried customizing from the tutorial but didn't help either:

class MyAdminConfig(TGAdminConfig):  # overridding the default Time_stamp look
    class time_stamp(CrudRestControllerConfig):
        class table_type(TableBase):
            __entity__ = Time_stamp
            __limit_fields__ = ['stamp', 'timestamp']

        class table_filler_type(TableFiller):
            __entity__ = Time_stamp
            __limit_fields__ = ['id', 'stamp', 'timestamp']

I'm quite a newbie with turbogears so maybe I'm missing something obvious

and another small question, where can I customize the table css (grid td, .grid th) ?
tg 2.1.3

jeetu

unread,
Aug 6, 2012, 2:20:32 PM8/6/12
to turbo...@googlegroups.com
http://sprox.org/tutorials/table.html
http://sprox.org/modules/sprox.fillerbase.html

Search for __action__ in the above two links. As you are limiting to some fields, __action__ is automatically getting excluded. Try including it in the __limit_fields__ and you should be through.

alonn

unread,
Aug 6, 2012, 4:32:22 PM8/6/12
to turbo...@googlegroups.com
Don't think this is the problem, since I've got the action field, which is automatically included unless specifically omitted, my problem is the the action field doesn't contain delete but only edit

Moritz Schlarb

unread,
Aug 8, 2012, 6:48:09 AM8/8/12
to turbo...@googlegroups.com
That's odd since there is no dynamic code in there that generates the action field:
Could you check the generated HTML if it's not just hidden somehow?

alonn

unread,
Aug 8, 2012, 8:36:17 AM8/8/12
to turbo...@googlegroups.com
thanks . the css hides it for some reason. thanks for the help, I'll check into the css now and check
Reply all
Reply to author
Forward
0 new messages