#24749: contribute_to_class(virtual_field=True) is ignored
-------------------------------------+-------------------------------------
     Reporter:  hampsterx            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.8
  (models, ORM)                      |
     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
-------------------------------------+-------------------------------------
Changes (by knbk):

 * severity:  Release blocker => Normal


Comment:

 I don't see a release-blocking bug here. In every built-in case (e.g. [1],
 [2], [3]), non-concrete fields explicitly override this behaviour, so any
 built-in non-concrete fields have `concrete = False`. So while it doesn't
 make any sense, it is working as advertised for all built-in fields (and
 the documentation says nothing about custom fields in that regard).

 Now this definitely should be cleaned up and/or properly documented
 (especially in the "Writing custom model fields"[4] section). This ties in
 to #16508 as well, I think.

 [1]
 
https://github.com/django/django/blob/master/django/db/models/fields/related.py#L1276
 [2]
 
https://github.com/django/django/blob/master/django/db/models/fields/related.py#L1730
 [3]
 
https://github.com/django/django/blob/master/django/contrib/contenttypes/fields.py#L32
 [4] https://docs.djangoproject.com/en/1.8/howto/custom-model-
 fields/#writing-a-field-subclass

--
Ticket URL: <https://code.djangoproject.com/ticket/24749#comment:2>
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/067.2b25d0a7c338ea75f992cfbf6ec18b1a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to