Django admin inline: select_related

前端 未结 4 585
[愿得一人]
[愿得一人] 2020-12-14 04:52

Using Django 1.8 on Python 3.4.1 with models:

class Product(models.Model):
    name = models.CharField(max_length=255)
    # some more fields here

    def _         


        
4条回答
  •  伪装坚强ぢ
    2020-12-14 05:12

    I'm working currently on a similar problem. What I have found is documented at this thread: Translatable Manytomany fields in admin generate many queries

    One important observation I did is that my solution works only for Django 1.7x and not for 1.8. Exactly same code, with d1.7 I have order of 10^1 queries, and with new installation of d1.8 I have 10^4.

提交回复
热议问题