From a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055 Mon Sep 17 00:00:00 2001 From: coderick14 Date: Wed, 17 May 2017 15:40:18 +0530 Subject: Upgrade to Django 1.11 - Database integration yet to be tested --- webcam/management/commands/__init__.py | 0 webcam/management/commands/reload_images.py | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 webcam/management/commands/__init__.py create mode 100644 webcam/management/commands/reload_images.py (limited to 'webcam/management/commands') diff --git a/webcam/management/commands/__init__.py b/webcam/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 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) -- cgit