Hi All, I am currently working on the new Options API (https://github.com/django/django/pull/2894).
The Options API is at the core of Django, it enables introspection of Django Models with the rest of the system. This enables lookups, queries, forms, admin to understand the capabilities of every model. The Options API is hidden under the _meta attribute of each model class. Options has always been a private API, but Django developers have always been using it in their own projects, in a non-official way. As part of my SoC project, I am exposing the new API for public use. As we are also formalizing a new API that has always existed, It is important to revisit the terminology and document it. The current terminology is described here https://code.djangoproject.com/wiki/new_meta_api in the section concepts. I would encourage all contributors to read the document and express their opinion, if they think something should be changed. A few interesting comments up till now: Loic on the PR: - I prefer "concrete" to "data" as it makes the parallel with "virtual" more obvious. - "related_objects" > "reverse_rel" - "related_m2m" > "reverse_m2m" - What about reverse o2o, do they currently fall under "related_objects"? - The main issue I have with "related" is that it doesn't provide a sense of direction, after all both sides of a FK have related objects waiting on the other end. I also like the symmetry between "m2m" and "reverse_m2m". - Django isn't always consistent (and sometime actually wrong) in naming relations, especially indjango/db/models/fields/related.py. Now that we start documenting all those things, I see value in getting it right. Thanks, Daniel -- You received this message because you are subscribed to the Google Groups "Django developers" 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/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e2836a1b-ad2e-4f32-b052-3177796d97f7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
