#26069: Docs for MyModel._meta.get_fields_with_model() missing info about
'is_relation'
--------------------------------------+------------------------------------
Reporter: srkunze | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.8
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
--------------------------------------+------------------------------------
Comment (by srkunze):
After reading the docs again, we discovered the original intention. We
found it would help just to add "old" and "new".
{{{
old:
MyModel._meta.get_fields_with_model():
new:
[
(f, f.model if f.model != MyModel else None)
for f in MyModel._meta.get_fields()
if not f.is_relation
or f.one_to_one
or (f.many_to_one and f.related_model)
]
}}}
This would need to be repeated for all deprecated functions but would make
the intention clear.
--
Ticket URL: <https://code.djangoproject.com/ticket/26069#comment:4>
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/065.d0554ce0db46d7674ea590328191b227%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.