Commit 51876baa authored by Mario Chirinos's avatar Mario Chirinos

update.sh

parent da2323d2
......@@ -56,8 +56,19 @@ class Command(BaseCommand):
print (p)
os.chdir(p)
publisher = Publisher.objects.all().filter(shortName=p)[0]
print(publisher)
publisher = Publisher.objects.all().filter(shortName=p)
if publisher.count()<=0 and os.path.isfile(p+"/settings.json") :
# newPublisher = Publisher()
# newPublisher.shortName=p
print(publisher, "do not exsist")
# [0]
# publisher=
news = News.objects.all().filter(publisher=publisher.id).order_by("-date")
minYear = 0
lastDate = datetime.datetime(1950,1,1)
......
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