forked from c3subtitles/subtitleStatus
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathforce_32c3_update.py
More file actions
33 lines (24 loc) · 921 Bytes
/
force_32c3_update.py
File metadata and controls
33 lines (24 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#==============================================================================
# This script removes all schedule versions from the database which causes the
# schedule update script to import every schedule again
#==============================================================================
import os
import sys
from lxml import etree
from urllib import request
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "subtitleStatus.settings")
import django
django.setup()
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.core.exceptions import ObjectDoesNotExist
from www.models import Event
try:
event_32c3 = Event.objects.get(acronym = "32c3")
event_32c3.schedule_version = "force update"
event_32c3.save()
except:
print("Fehler")
print("Fahrplanversion für 31c3 zurück gesetzt!")