mark_safe(media) in django admin Opzioni
|Reported by:||riccardodivirgilio||Owned by:||pbnan|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
a minor bug in django admin.
in django.contrib.admin.options mark_safe is called to render media.
in add_view and change_view we can find mark_safe(media)
in changelist_view media is injected as an object (without mark_safe)
i propose to pass the media object to the template (without
mark_safe), because i use a template tag that adds media.
so i check in the context if there is 'media' key, and then merge my
but i cannot do this if the media object is rendered before it is
passed to the context processor.
Change History (6)
comment:1 Changed 3 years ago by aaugustin
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Bug to Cleanup/optimization