﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28011	Correct Field.hidden docs regarding what fields are hidden	Tim Graham	Adam Johnson	"The [https://github.com/django/django/blob/d4d79d0f200357b28419203557cc61c8168316ab/docs/ref/models/fields.txt#L1912-L1918 Field.hidden] docs say, ""Boolean flag that indicates if a field is used to back another non-hidden field’s functionality (e.g. the content_type and object_id fields that make up a GenericForeignKey)."" This seems inaccurate:
{{{#!python
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.db import models

class TaggedItem(models.Model):
    tag = models.SlugField()
    content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE, related_name='tagged_items')
    object_id = models.PositiveIntegerField()
    content_object = GenericForeignKey('content_type', 'object_id')

>>> TaggedItem._meta.get_field('object_id')
<django.db.models.fields.PositiveIntegerField: object_id>
>>> TaggedItem._meta.get_field('content_type')
<django.db.models.fields.related.ForeignKey: content_type>
}}}
(`object_id` and `content_type` aren't hidden).

There's a related discussion in the [https://github.com/django/django/blob/d4d79d0f200357b28419203557cc61c8168316ab/docs/ref/models/meta.txt#L79-L84 Options.get_fields() docs] that also needs some correction.

Another thing I noticed is that `Field.hidden` is [https://github.com/django/django/blob/d4d79d0f200357b28419203557cc61c8168316ab/django/db/models/options.py#L792-L793 only consulted for relational fields]. Removing `Field.hidden` and `GenericForeignKey.hidden` doesn't result in any crash of `get_fields()` because those attributes are never consulted. "	Bug	closed	Documentation	1.10	Normal	fixed			Ready for checkin	1	0	0	0	0	0
