diff options
Diffstat (limited to 'sbhs_server/webcam/management')
-rw-r--r-- | sbhs_server/webcam/management/__init__.py | 0 | ||||
-rw-r--r-- | sbhs_server/webcam/management/__init__.pyc | bin | 0 -> 156 bytes | |||
-rw-r--r-- | sbhs_server/webcam/management/commands/__init__.py | 0 | ||||
-rw-r--r-- | sbhs_server/webcam/management/commands/reload_images.py | 12 |
4 files changed, 12 insertions, 0 deletions
diff --git a/sbhs_server/webcam/management/__init__.py b/sbhs_server/webcam/management/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/sbhs_server/webcam/management/__init__.py diff --git a/sbhs_server/webcam/management/__init__.pyc b/sbhs_server/webcam/management/__init__.pyc Binary files differnew file mode 100644 index 0000000..be6dca2 --- /dev/null +++ b/sbhs_server/webcam/management/__init__.pyc diff --git a/sbhs_server/webcam/management/commands/__init__.py b/sbhs_server/webcam/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/sbhs_server/webcam/management/commands/__init__.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) |