Limit API queries for snipts to 20 per page.
parent
3bafbb7402
commit
57d2e06f68
|
@ -236,7 +236,7 @@ class PublicSniptResource(ModelResource):
|
||||||
allowed_methods = ['get']
|
allowed_methods = ['get']
|
||||||
filtering = {'user': 'exact', 'blog_post': 'exact'}
|
filtering = {'user': 'exact', 'blog_post': 'exact'}
|
||||||
ordering = ['created', 'modified']
|
ordering = ['created', 'modified']
|
||||||
max_limit = 200
|
max_limit = 20
|
||||||
cache = SimpleCache()
|
cache = SimpleCache()
|
||||||
|
|
||||||
def dehydrate(self, bundle):
|
def dehydrate(self, bundle):
|
||||||
|
@ -364,7 +364,7 @@ class PrivateSniptResource(ModelResource):
|
||||||
validation = SniptValidation()
|
validation = SniptValidation()
|
||||||
ordering = ['created', 'modified']
|
ordering = ['created', 'modified']
|
||||||
always_return_data = True
|
always_return_data = True
|
||||||
max_limit = 200
|
max_limit = 20
|
||||||
cache = SimpleCache()
|
cache = SimpleCache()
|
||||||
|
|
||||||
def dehydrate(self, bundle):
|
def dehydrate(self, bundle):
|
||||||
|
|
Loading…
Reference in New Issue