#21940: Consistent contribute_to_class's virtual_only
-------------------------------+--------------------
     Reporter:  Kronuz         |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  1.6
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 I needed to create a field like class for my django project and I wanted
 it to be a virtual field... `virtual_only` is there for that reason, but
 my field was inheriting from `FileField`, and
 `FileField.contribute_to_class()` doesn't take `virtual_only` and so it
 doesn't passes it to `Field.contribute_to_class()`. I believe passing
 `virtual_only` attribute should be consistent across the source code. I'm
 attaching a simple patch to fix this. One warning would be for custom
 fields made by users which have their own `contribute_to_class` (those
 will need to be changed to properly receive the `virtual_only` parameter
 as optional.)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21940>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.33a6fda62bdba2175de00833f044a9e8%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to