From 4336f5f06f61de30ae3fa54650fce63a9d5ef5be Mon Sep 17 00:00:00 2001 From: ttt Date: Sat, 13 May 2017 00:29:47 +0530 Subject: added all server files --- sbhs_server/webcam/management/commands/reload_images.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sbhs_server/webcam/management/commands/reload_images.py (limited to 'sbhs_server/webcam/management/commands/reload_images.py') diff --git a/sbhs_server/webcam/management/commands/reload_images.py b/sbhs_server/webcam/management/commands/reload_images.py new file mode 100644 index 0000000..5b735cb --- /dev/null +++ b/sbhs_server/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) -- cgit