diff options
author | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2016-08-17 22:03:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-17 22:03:32 (GMT) |
commit | 0c2a864cc58acf436d49a09877ca55dd2c3b4fc4 (patch) | |
tree | a92f0f3ccdc212f34bc67db43e7fb5f2da8f5075 /program/management/commands/update_programslots.py | |
parent | 6990ff7f88f827d7193cb5ddef0be22546bccd23 (diff) | |
parent | 8531fd1756b37cf4c5d7c14d22dc9fb5057e0e74 (diff) |
Merge pull request #3 from radio-helsinki-graz/recognize_activity
Recognize activity
Diffstat (limited to 'program/management/commands/update_programslots.py')
-rw-r--r-- | program/management/commands/update_programslots.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/program/management/commands/update_programslots.py b/program/management/commands/update_programslots.py deleted file mode 100644 index 6f7ec90..0000000 --- a/program/management/commands/update_programslots.py +++ /dev/null @@ -1,15 +0,0 @@ -from django.core.management.base import NoArgsCommand - -from program.models import ProgramSlot - -from datetime import datetime - - -class Command(NoArgsCommand): - help = 'update programslots by setting is_active' - - def handle_noargs(self, **options): - deactivated = ProgramSlot.objects.filter(until__lt=datetime.now()).update(is_active=False) - activated = ProgramSlot.objects.filter(until__gt=datetime.now()).update(is_active=True) - - print "%s program slots activated, %s program slots de-activated" % (activated, deactivated) |