diff options
Diffstat (limited to 'webcam/management/commands/reload_images.py')
-rw-r--r-- | webcam/management/commands/reload_images.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/webcam/management/commands/reload_images.py b/webcam/management/commands/reload_images.py new file mode 100644 index 0000000..5b735cb --- /dev/null +++ b/webcam/management/commands/reload_images.py @@ -0,0 +1,12 @@ +from django.core.management.base import BaseCommand +from sbhs_server.tables.models import Board +from sbhs_server.webcam.views import load_image + +class Command(BaseCommand): + args = '' + help = 'Reloads images for all SBHS machines' + + def handle(self, *args, **options): + boards = Board.objects.all() + for b in boards: + load_image(b.mid) |