The following worked without having to copy the entire
_di_get_provider_count_and_objs method:
class MyAdminConfig(
>>
>> TGMongoAdminConfig):
>> default_index_template = "mako:projectName.templates.admin"
>>
>>
>>
>> class user(CrudRestControllerConfig):
>> class table_type(TableBase):
>> __entity__ = User
>> __limit_fields__ = ['display_name', 'email_address', 'groups']
>>
>> __url__ = '../user.json' #this just tidies up the URL a bit
>>
>> class table_filler_type(TableFiller):
>> __entity__ = User
>> __limit_fields__ = ['_id', 'display_name', 'email_address',
>> 'groups']
>>
>>
>> def _do_get_provider_count_and_objs(self, **kw):
>> *kw.update({'_groups':{'$in': ['plats']}}) **# adjust
>> filter to your orm and needs**
>> return TableFiller._do_get_provider_count_and_objs(self,
>> **kw)*
>
>
On Monday, November 4, 2013 8:05:50 AM UTC-6, Stuart Zurcher wrote:
>
> I have been looking around and have not found any documentation or
> examples of providing a subset of the entity for admin.
>
> I would like to provide all users of a group for that group's
> administrator. I can hard code the forms but was wondering if there is a
> simpler way with the admin module as I have several of these type of
> instances which a simple solution would save considerable time.
>
--
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.