#5793: Allow custom attributes in Meta classes
-------------------------------------+-------------------------------------
Reporter: eikke@… | Owner: Saeed
| Hasani Borzadaran
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Old description:
> In some cass it is useful to be able to store meta information on models
> inside the model class. In Django the Meta subclass is used to achieve
> this. Trying to add a custom attribute to a model's Meta inner class
> results in an exception though, thrown from django.db.models.options,
> which does indeed check any valid attribute names and raises an exception
> when unknown names are found.
> Is there any reason for this somewhat strange behaviour, not to allow a
> developer to add non-standard meta information to a model class (which
> can later on be used in eg view code)?
>
> Thanks!
New description:
--
Comment (by Saeed Hasani Borzadaran):
Did I get it right?
The Meta class now receives a series of fixed attributes. We want to make
these features dynamic. Does it mean that the developer can add attributes
to the class?
If yes, can I contribute to this feature in Django 4 or not?
Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/5793#comment:27>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070181cfaf2219-93cf5a25-4e0c-4ada-97ca-b06093d13c9d-000000%40eu-central-1.amazonses.com.