Opened 8 years ago
Closed 8 years ago
#28057 closed Bug (invalid)
Admin inlines very slow to render
Reported by: | Marc DEBUREAUX | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.11 |
Severity: | Normal | Keywords: | admin inlines |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
When using inlines in Django admin, it renders very poorly even when creating a new element (so no data to load, database time always the same).
And the higher the number in "extra" parameter, the longer it takes to load the form.
Works well with Django 1.10
class EffectModifierInline(admin.TabularInline): model = EffectModifier extra = 1 @admin.register(Effect) class EffectAdmin(admin.ModelAdmin): fieldsets = ( # Whatever ) inlines = [EffectModifierInline] # TODO: list_display = () list_editable = () list_filter = () def get_queryset(self, request): return super().get_queryset(request).prefetch_related('modifiers')
Change History (4)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
UI/UX: | unset |
---|
comment:3 by , 8 years ago
comment:4 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Yes, the issue is caused by the django-debug-toolbar I believe. See https://github.com/jazzband/django-debug-toolbar/issues/910.
Note:
See TracTickets
for help on using tickets.
I encountered something similar just now, turned out the issue was occurring only when debug-toolbar was enabled.