Commit adbbad03 authored by Mario Chirinos's avatar Mario Chirinos

bulk upload

parent b6d9e5a6
...@@ -77,7 +77,7 @@ class Command(BaseCommand): ...@@ -77,7 +77,7 @@ class Command(BaseCommand):
if fileDate >= lastDate.date(): if fileDate >= lastDate.date():
print("FILE DATE ", fileDate) print("FILE DATE ", fileDate)
#delete news form the most recent day in the database so it can upload the day again #delete news form the most recent day in the database so it can upload the day again
News.objects.filter(Q(publisher=publisher.id) Q(date__gte=newsDate)).delete() News.objects.filter(Q(publisher=publisher.id) & Q(date__gte=newsDate)).delete()
with open(f) as data_file: with open(f) as data_file:
try: try:
print(f) print(f)
......
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