Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2019-10-02 20:37:06 +02:00
parent 20f2d2cbe0
commit f25651981b

View File

@@ -803,6 +803,7 @@ def get_thumbnails(request,id):
def get_blog_posts(request):
try:
response = requests.get(
'https://analytics.rowsandall.com/wp-json/wp/v2/posts')
if response.status_code == 200:
@@ -811,6 +812,8 @@ def get_blog_posts(request):
# o.write(json.dumps(blogs_json,indent=2,sort_keys=True))
else:
blogs_json = []
except ConnectionError:
pass
blogposts = []