#35748: Document that Field.formfield() may return None
-------------------------------------+-------------------------------------
     Reporter:  Adam Johnson         |                     Type:
                                     |  Cleanup/optimization
       Status:  new                  |                Component:  Database
                                     |  layer (models, ORM)
      Version:  dev                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 The
 
[https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.formfield
 current documentation] only states that a form field should be returned.
 `None` is also an allowed return value,
 
[https://github.com/django/django/blob/cdbd31960e0cf41063b3efac97292ee0ccc262bb/django/db/models/fields/__init__.py#L2828-L2829
 as used by AutoFieldMixin], used to
 
[https://github.com/django/django/blob/cdbd31960e0cf41063b3efac97292ee0ccc262bb/django/forms/models.py#L236-L248
 ignore the field] when constructing the model form.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35748>
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/01070191d70d7624-8f57c0bc-afc0-4ab7-a2d1-02842892b80c-000000%40eu-central-1.amazonses.com.

Reply via email to