Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/j/a/jaam-HEAD/jaam/api/resources.py   jaam(Download)
    class Meta:
        queryset = Photo.published_objects.all()
        allowed_methods = ['get']
        filtering = {
            'slug': ALL,
    def get_object_list(self, request):
        if hasattr(request, 'GET') and 'gallery__id' in request.GET:
            return Photo.published_objects.filter(photogallery=request.GET['gallery__id']).order_by('photogalleryitem__order')
        else:
            return Photo.published_objects.all()