from .branding import get_branding_context, get_trial_context from .roles import template_role_context def role_context(request): context = template_role_context(getattr(request, 'user', None)) context.update(get_branding_context()) context.update(get_trial_context()) return context