阅读背景:

提高管理员中Django ForeignKey字段的性能

来源:互联网 

By default, Django's admin renders ForeignKey fields in admin as a select field, listing every record in the foreign table as an option. In one admin-accessible model, I'm referencing the User model as a ForeignKey, and since I have thousands of users Django is populating the select with thousands of options. This is causing the admin page to load incredibly slowly, and the select is not very useful since it can take a while to scroll through thousands of options to find the one you want.By default, Django's admin renders ForeignKey f




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: