class Meta: cache = HttpCache(control={ 'max_age': 1800, 's_maxage': 1800, 'public': True }) queryset = Event.objects.all() resource_name = 'event' authentication = Authentication() authorization = ReadOnlyAuthorization() serializer = iCalSerializer(formats=['json', 'jsonp', 'ical']) allowed_methods = ['get'] ordering = ['start'] fields = [ 'name', 'start', 'end', 'timezone', 'venue', 'city', 'region', 'country', 'lat', 'lon', 'external_link', 'description', 'mozilla_event', 'owner', 'estimated_attendance' ] filtering = { 'name': ALL, 'city': ALL, 'region': ALL, 'country': ALL, 'start': ALL, 'end': ALL, 'categories': ALL_WITH_RELATIONS }
class Meta: cache = HttpCache(control={ 'max_age': 1800, 's_maxage': 1800, 'public': True }) # By default events should be always ordered by start date unless # specified by a query parameter queryset = Event.objects.all().order_by('start') resource_name = 'event' authentication = Authentication() authorization = ReadOnlyAuthorization() serializer = iCalSerializer(formats=['json', 'jsonp', 'ical']) allowed_methods = ['get'] ordering = ['start', 'end'] fields = [ 'name', 'start', 'end', 'timezone', 'venue', 'city', 'region', 'country', 'lat', 'lon', 'external_link', 'description', 'mozilla_event', 'owner', 'estimated_attendance', 'actual_attendance' ] filtering = { 'name': ALL, 'city': ALL, 'region': ALL, 'country': ALL, 'start': ALL, 'end': ALL, 'estimated_attendance': ALL, 'categories': ALL_WITH_RELATIONS, 'campaign': ALL_WITH_RELATIONS } max_limit = 40 throttle = RemoAPIThrottle()