Commit 6836d141 authored by Mario Chirinos's avatar Mario Chirinos

bulk upload

parent 67a2095b
......@@ -75,8 +75,8 @@ class Command(BaseCommand):
for f in filesList:
fileDate = datetime.datetime.strptime(f[:f.find(".")], "%Y-%m-%d").date()
print(fileDate)
if fileDate >= lastDate.date():
print(fileDate)
#delete news form the most recent day in the database so it can upload the day again
News.objects.filter(date__gte=fileDate).delete()
with open(f) as data_file:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment