On Tue, Dec 8, 2015 at 5:41 AM, Jean-Denis Girard <[email protected]>
wrote:

>
> I think it would be great if we could add attributes to the sqlalchemy
> model that would be reused by tgext.admin pages:
>
> class User(DeclarativeBase):
>     __tablename__ = 'tg_user'
>     __label__ = l_(u'user')
>     __help_text__ = l_(u'user name for logging in')
> ...
>
> So if model has a __label__ it is reused in the admin pages, else
> __name__ is used. What do you think?
>

I think it's fairly easy to implement,
actually the design on tgext.admin is to never add properties to the
models, but use a AdminConfig, so it should be added to the config of each
admin section.
But it should be fairly easy to add translations for each model. I'm pretty
busy the next weeks but If anyone is willing to contribute it I'll gladly
check and merge it.

Currently there is a translation configuration attribute, but has nothing
to do with translations.

-- 
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/d/optout.

Reply via email to