summaryrefslogtreecommitdiff
path: root/webcam/management/commands/reload_images.py
blob: 5b735cbd73fefd33e91de3f1d0ff6a527afdb2b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
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)