Commit b6d9e5a6 authored by Mario Chirinos's avatar Mario Chirinos

bulk upload

parent 2ed67f05
......@@ -77,7 +77,7 @@ class Command(BaseCommand):
if fileDate >= lastDate.date():
print("FILE DATE ", 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()
News.objects.filter(Q(publisher=publisher.id) Q(date__gte=newsDate)).delete()
with open(f) as data_file:
try:
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