You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
559 B

# -*- coding: utf-8 -*-
from .common import TYPES
class BaseFilterMixin(object):
def get_context_data(self, **kwargs):
context = super(BaseFilterMixin, self).get_context_data(**kwargs)
if self.event_type is not None:
context['event_type'] = self.event_type
context['can_filter'] = True
return context
class ConfFilterMixin(BaseFilterMixin):
event_type = TYPES.CONF
class ExpoFilterMixin(BaseFilterMixin):
event_type = TYPES.EXPO
class SearchFilterMixin(BaseFilterMixin):
event_type = None