def placeholder(context, name):
    from easy_cms.models import Placeholder
    from django.core.urlresolvers import resolve
    site = Site.objects.get_current()
    try:
        container = Placeholder.objects.get(name=name, site=site)
        if container.view_name:
            request = context['request']
            match = resolve(request.path)
            if not container.view_name == match.view_name:
                logger.warn('Placeholder view names does not match.')
                return ''
    except Placeholder.DoesNotExist:
        logger.warn('Placeholder "%s" not found' % name)
        return ''

    widgets = []
    for c in container.widget_config:
        widget_name = c['name']
        template_name = c.get('template_name')
        cache_enabled = c.get('cache_enabled')
        cache_timeout = c.get('cache_timeout')
        cache_key = c.get('cache_key')
        cache_key_prefix = c.get('cache_key_prefix')
        vary_on_headers = c.get('vary_on_headers')
        vary_on_cookies = c.get('vary_on_cookies')
        vary_on_sessions = c.get('vary_on_sessions')
        params = c.get('params', {})
        output = widget(context,
                        widget_name,
                        template_name=template_name,
                        cache_enabled=cache_enabled,
                        cache_timeout=cache_timeout,
                        cache_key=cache_key,
                        cache_key_prefix=cache_key_prefix,
                        vary_on_headers=vary_on_headers,
                        vary_on_cookies=vary_on_cookies,
                        vary_on_sessions=vary_on_sessions,
                        **params)
        widgets.append(output)

    placeholder_template_name = container.template_name
    if not placeholder_template_name:
        placeholder_template_name = name % 'cms/placeholders/%s.html'
    return render_to_string(placeholder_template_name, {
        'placeholder_name': name,
        'widgets': widgets
    })
dataset/ETHPy150Open metglobal/django-easy-cms/easy_cms/templatetags/cms.py/placeholder/swapped operands of `%`