expose cells media in the page (#8167)

This commit is contained in:
Serghei Mihai 2015-09-10 17:59:25 +02:00
parent e97ece9fa3
commit 4e94b62894
2 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/combo-style.css"/>
<script src="{% xstatic 'jquery' 'jquery.min.js' %}"></script>
<script src="{{ STATIC_URL }}js/combo.public.js"></script>
{{ media }}
</head>
<body class="page-{{ page.slug }}">
<div id="title"><h1>{{ page.title }}</h1></div>

View File

@ -25,6 +25,7 @@ from django.http import (Http404, HttpResponse, HttpResponseRedirect,
HttpResponsePermanentRedirect)
from django.shortcuts import render, resolve_url
from django.template import RequestContext
from django.forms.widgets import Media
try:
from mellon.utils import get_idps
@ -204,6 +205,7 @@ def page(request):
'page': page,
'page_cells': cells,
'request': request,
'media': sum((cell.media for cell in cells), Media())
}
template_name = combo_template['template']