Private
Public Access
1
0

limiting blog post call to 3

This commit is contained in:
Sander Roosendaal
2019-10-17 15:54:28 +02:00
parent 65db7ee6d8
commit b4a56f32ac

View File

@@ -805,7 +805,7 @@ def get_thumbnails(request,id):
def get_blog_posts(request):
try:
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:
blogs_json = response.json()
# with open('blogs.txt','w') as o: