#13150: Replace make_safe(media) with media in ModelAdmin context dictionary
----------------------------------+-----------------------------------------
Reporter: lsbardel | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: SVN
Keywords: media | Stage: Unreviewed
Has_patch: 1 |
----------------------------------+-----------------------------------------
Currently, the media object is converted to safe string in both
{{{add_view}}} and {{{change_view}}} methods when added to the context
dictionary
while in {{{changelist_view}}} is not (the correct approach).
Converting media to string means you cannot split css from js in
templates. What I'd like to do is
{{{
<head>
...
{% for css in media.render_css %}
{{ css|safe }}{% endfor %}
</head>
<body>
...
{% for js in media.render_js %}
{{ js|safe }}{% endfor %}
</body>
}}}
A two lines modification.
--
Ticket URL: <http://code.djangoproject.com/ticket/13150>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.