def sponsors(context): self = context.get('self') if hasattr(self, 'show_sponsors') and self.show_sponsors: sponsors = Sponsor.for_event(self) else: sponsors = [] return { 'sponsors': sponsors, 'request': context['request'], }
def sponsors(context): self = context.get("self") if hasattr(self, "show_sponsors") and self.show_sponsors: sponsors = Sponsor.for_event(self) else: sponsors = [] return { "sponsors": sponsors, "request": context["request"], }