On Sat, Sep 21, 2013 at 05:59:54PM +0200, Alessandro Molina wrote: > As far as I can see __limit_fields__ has effects only on views, not on > fillers. Right, I think I can see what I did now.
> At least up to 2010 the providers didn't do anything with the > limit_fields, it just got ignored. > Probably what you want to do is put it inside the TableBase declaration, > not into the TableFiller. I fixed the filler for my normal controller. sprox's sorting was broken too and a few other things. I cannot use TableBase because I'm using jqGrid. Actually __limit_fields__ works in TableBase (ie the grid shows the columns I want) but TableFiller doesn't as you said, which means I get a grid that doesn't have the fields I want. Damn. So, __omit_fields__ will remove most of the fields I don't care about. How do add fields? A foreign key for example? (Defined in the model as a relation). 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. - Craig > > On Sat, Sep 21, 2013 at 4:29 PM, Moritz Schlarb <[email protected]> > wrote: > > I don't recall __limit_fields__ in sprox anymore, are you sure this > fields has effect at all? > Did you try with __omit_fields__ and __field_order___? > > Am Donnerstag, 19. September 2013 15:28:38 UTC+2 schrieb Craig Small: > > I'm hoping someone can help me with this. > It seems something has changed how the admin controller works with the > TableFiller. No matter what I do, I am unable to adjust the fields > that are shown. My normal controllers work fine as before. > > The code snippet is: > > class MyAdminConfig(AdminConfig): > > class host(MyCrudRestControllerConfig): > class table_filler_type(RequestLocalTableFiller): > entity = model.Host > __limit_fields__ = ('id', 'zone_id',) > > In theory, /admin/hosts.json should show me only those two fields, but > I see all of them. I know TG is "looking at" this part of the code > because removing entity line gives an error: > "You must define a __entity__ attribute for this object " > > -- > 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. > > -- > 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. -- 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.

