mirror of
https://github.com/pinry/pinry.git
synced 2026-06-23 12:31:38 +02:00
Merge pull request #42 from kklimonda/master
Enable filtering over the published field
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,6 +3,7 @@
|
||||
/lib/
|
||||
/include/
|
||||
/local
|
||||
/Scripts/
|
||||
|
||||
# pip
|
||||
/pip-log.txt
|
||||
|
||||
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user