Example #1
0
    def get(self, request, *args, **kwargs):
        app = self.get_object()

        self.queryset = app.content_ratings.all()

        if "since" in request.GET:
            form = ContentRatingForm(request.GET)
            if form.is_valid():
                self.queryset = self.queryset.filter(modified__gt=form.cleaned_data["since"])

        if not self.queryset.exists():
            raise http.Http404()

        return super(ContentRatingList, self).get(self, request)
Example #2
0
    def get(self, request, *args, **kwargs):
        app = self.get_object()

        self.queryset = app.content_ratings.all()

        if 'since' in request.GET:
            form = ContentRatingForm(request.GET)
            if form.is_valid():
                self.queryset = self.queryset.filter(
                    modified__gt=form.cleaned_data['since'])

        if not self.queryset.exists():
            raise http.Http404()

        return super(ContentRatingList, self).get(self, request)