Right now, I have an admin page with a Container and a stackedInline for the Pages. The pages have 2 ForeignKeys in them and as the # of values for those ForeignKeys grows, the page takes forever to render.
How do I manage to display the value of the ForeignKey, but NOT let it be a changeable thing in the admin? I definetely want to display the str(ForeignModel) in the inlines, but I don’t want a select box with several 1000 choices to be loaded once for each Page model.
I remember reading about this somewhere, but can’t seem to locate it anymore. If it wasn’t in the admin, I could just change out the widget, but I don’t know how to do that in the admin.
Are you talking about ModelAdmin.readonly_fields?
And, for future reference, it’s easy to change out the widget in the admin.
For a specific field:
For all fields of a particular type: