Private
Public Access
1
0

fix fetchblogposts

This commit is contained in:
Sander Roosendaal
2022-05-12 07:46:04 +02:00
parent 08502c8f4d
commit a325b98ac3

View File

@@ -10,6 +10,7 @@ from simplejson.errors import JSONDecodeError
from django.core.management.base import BaseCommand
from rowers.models import BlogPost
from django.utils import timezone
PY3K = sys.version_info >= (3, 0)
@@ -39,7 +40,7 @@ class Command(BaseCommand):
for postdata in blogs_json[0:3]:
title = postdata['title']['rendered']
link = postdata['link']
date = datetime.date()
date = timezone.now()
blogpost = BlogPost(
link=link,