"""
Injects the current tenant into every template context.

Templates can use:
  {{ tenant.name }}
  {{ tenant.accent_colour }}
  {{ tenant.logo.url }}
  {% if tenant.has_module 'portfolio' %}
"""


def tenant_context(request):
    tenant = getattr(request, 'tenant', None)
    return {
        'tenant': tenant,
    }
