gets analytics posts
This commit is contained in:
@@ -2,9 +2,12 @@ from django.shortcuts import render, redirect, render_to_response
|
|||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from rowers.forms import LoginForm
|
from rowers.forms import LoginForm
|
||||||
|
from django.http import HttpResponse
|
||||||
|
|
||||||
from rowingdata import main as rmain
|
from rowingdata import main as rmain
|
||||||
|
|
||||||
|
import requests
|
||||||
|
import json
|
||||||
import random
|
import random
|
||||||
|
|
||||||
def rootview(request):
|
def rootview(request):
|
||||||
@@ -53,7 +56,16 @@ def rootview(request):
|
|||||||
'text':'Rowsandall.com is the ideal platform for remote rowing coaching. As a coach, you can easily manage your athletes, set up plans and monitor execution and technique'
|
'text':'Rowsandall.com is the ideal platform for remote rowing coaching. As a coach, you can easily manage your athletes, set up plans and monitor execution and technique'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
response = requests.get(
|
||||||
|
'https://analytics.rowsandall.com/wp-json/wp/v2/posts')
|
||||||
|
if response.status_code == 200:
|
||||||
|
blogs_json = response.json()
|
||||||
|
# with open('blogs.txt','w') as o:
|
||||||
|
# o.write(json.dumps(blogs_json,indent=2,sort_keys=True))
|
||||||
|
else:
|
||||||
|
blogs_json = []
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
allofferings = [
|
allofferings = [
|
||||||
planoffering,
|
planoffering,
|
||||||
|
|||||||
Reference in New Issue
Block a user