Merge pull request #42 from kklimonda/master

Enable filtering over the published field
This commit is contained in:
Isaac Bythewood
2012-07-16 08:20:08 -07:00
2 changed files with 4 additions and 0 deletions

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@
/lib/
/include/
/local
/Scripts/
# pip
/pip-log.txt

View File

@@ -15,6 +15,9 @@ class PinResource(ModelResource): # pylint: disable-msg=R0904
queryset = Pin.objects.all()
resource_name = 'pin'
include_resource_uri = False
filtering = {
'published': ['gt'],
}
def dehydrate_thumbnail(self, bundle):
pin = Pin.objects.only('image').get(pk=bundle.data['id'])