Sorry for the terrible pun here, but I'd like to suggest the meta-feature... allowing 3rd party apps to add their own options to Meta classes. If there was a sensible API for this (or if Django just copied all attributes defined in Meta onto _meta blindly), Django wouldn't have to add the translatable option without defining its behaviour. Instead the third party apps could all define their own and use that.
Another use case I've thought about for custom Meta options is allowing models to define their MySQL storage engines or other MySQL specific table options. Again something where you want to attach data per model but without polluting the core Options class. Currently third party apps working with custom model attributes can either rely on class-level attributes (not very Django-ey), or their own meta-style class (increasing noise in model definitions). Definitely Meta is the least surprising place to put these extra attributes, it would just be nice to have a way of doing this. On 14 February 2017 at 15:58, Patryk Zawadzki <pat...@gmail.com> wrote: > W dniu wtorek, 14 lutego 2017 16:19:48 UTC+1 użytkownik jp...@yourlabs.org > napisał: >> >> However, there's a third alternative to changing Meta that may be worth >> suggesting: adding a new Field attribute ie. translatable=True, which could >> be default for CharField and TextField perhaps. It might even turn to be an >> advantage that no existing translation app supports it that way. >> > > I'd vote against adding non-database-related attributes to model fields. I > actually hope one day Django will drop some of the existing ones that are > only used by admin (like `editable`). > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-developers/f58a8e66-e792-4468-91e6- > 7ca6e1b641c4%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/f58a8e66-e792-4468-91e6-7ca6e1b641c4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Adam -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM3_C4QfsCdnZa%2BVstuLXQs3N_0HJbSJY8_VpvVDfF%3DLCA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.