@register.simple_tag(takes_context=True)
def get_settings(context, use_default_site=False):
    if use_default_site:
        site = Site.objects.get(is_default_site=True)
    elif context in 'request':
        site = context['request'].site
    else:
        raise RuntimeError('No request found in context, and use_default_site '
                           'flag not set')

    context['settings'] = SettingsProxy(site)
    return ''
dataset/ETHPy150Open torchbox/wagtail/wagtail/contrib/settings/templatetags/wagtailsettings_tags.py/get_settings/swapped operands of `in`