• Jim Bailey's avatar
    Fixed #20849 -- ModelForms do not work well with prefetch_related. · 539e3693
    Jim Bailey yazdı
    model_to_dict() (used when rendering forms) queries the database
    to get the list of primary keys for ManyToMany fields. This is
    unnecessary if the field queryset has been prefetched, all the
    keys are already in memory and can be obtained with a simple
    iteration.
    539e3693
tests.py 76.6 KB