#23710: ModelForm is not using the plain manager for foreign keys
-------------------------------+--------------------
     Reporter:  eagle-r        |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Uncategorized  |    Version:  1.7
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 According to the documentation, Django will use an instance of the plain
 manager instead of the default manager for related fields (see
 https://docs.djangoproject.com/en/1.7/topics/db/managers/#using-managers-
 for-related-object-access).

 However, the ModelForm initialisation code is using the default manager
 instead when initialising the fields during loading (see
 django/db/models/fields/related.py:1749)

 So, if you have a model that is using a custom default manager, the
 modelform attempts to use this manager instead leading to some very
 unexpected side effects particularly when running the server and loading
 up the code initially.

--
Ticket URL: <https://code.djangoproject.com/ticket/23710>
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/050.0b01b51a33cb5e47423eb602148155a0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to