skeleton: makes sure nothing is rendered when cells are present (#9466)

This commit is contained in:
Frédéric Péters 2016-01-02 17:25:45 +01:00
parent 39bd8624a1
commit 54c9af60d4
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,8 @@ def placeholder(context, placeholder_name):
(context.get('render_skeleton') or x.is_relevant(context))]
if context.get('render_skeleton') and not context['cells']:
context['skeleton'] = skeleton_text(context, placeholder_name)
else:
context['skeleton'] = ''
return context
@register.simple_tag(takes_context=True)