limiting blog post call to 3
This commit is contained in:
@@ -805,7 +805,7 @@ def get_thumbnails(request,id):
|
|||||||
def get_blog_posts(request):
|
def get_blog_posts(request):
|
||||||
try:
|
try:
|
||||||
response = requests.get(
|
response = requests.get(
|
||||||
'https://analytics.rowsandall.com/wp-json/wp/v2/posts')
|
'https://analytics.rowsandall.com/wp-json/wp/v2/posts?per_page=3')
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
blogs_json = response.json()
|
blogs_json = response.json()
|
||||||
# with open('blogs.txt','w') as o:
|
# with open('blogs.txt','w') as o:
|
||||||
|
|||||||
Reference in New Issue
Block a user