#24758: Options.get_fields() returns reverse fields
--------------------------------------+------------------------------------
Reporter: ezarowny | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: _meta, documentation | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):
* needs_better_patch: => 0
* component: Database layer (models, ORM) => Documentation
* needs_tests: => 0
* needs_docs: => 0
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Proposed update of the docstring:
{{{
#!diff
diff --git a/django/db/models/options.py b/django/db/models/options.py
index a76b934..eb09269 100644
--- a/django/db/models/options.py
+++ b/django/db/models/options.py
@@ -755,9 +755,10 @@ class Options(object):
def get_fields(self, include_parents=True, include_hidden=False):
"""
- Returns a list of fields associated to the model. By default will
only
- return forward fields. This can be changed by enabling or
disabling
- field types using the parameters:
+ Returns a list of fields associated to the model. By default will
+ include forward and reverse fields, fields derived from
inheritance,
+ but not hidden fields. The returned fields can be changed by
using the
+ parameters:
- include_parents: include fields derived from inheritance
- include_hidden: include fields that have a related_name that
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24758#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.a41b983b56ccbba9438c6fc9b113232d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.