On Sun, Sep 22, 2013 at 08:18:58AM +1000, Craig Small wrote:
> What I am trying to do in the admin controller is have a grid that gets
> its data from json and can show foreign keys. It's only the last bit
> I'm missing now.
I've worked out why my changes work for the normal controllers and not
for the admin. The normal controllers basically call:
MyTableFiller.get_value()
and returns that for json processing. My changes sit in that method.
So, what happens on admin screens? Well it uses the tgext.crud setup
the crud controller has this to say:
table_filler
Class instance with get_value() that defines the JSon stream
for the table
My controller uses get_value, crud uses get_value, all good right?
Line 268 has:
if tg.request.response_type == 'application/json':
adapt_params_for_pagination(kw, self.pagination_enabled)
try:
count, values =
self.table_filler._do_get_provider_count_and_objs(**kw)
At the very least the comment needs to be changed. I'm not sure why
the controller calls this private method instead of get_value but it does
explain the difference.
- Craig
--
Craig Small VK2XLZ http://enc.com.au/ csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/groups/opt_out.