| 1 | from django.core.management.base import BaseCommand |
| 2 | from django.core.management import call_command |
| 3 | from smartwatch.watch import watch_files, start_servers |
| 4 | |
| 5 | class Command(BaseCommand): |
| 6 | help = 'Starts the file watcher' |
| 7 | |
| 8 | def handle(self, *args, **options): |
| 9 | self.stdout.write('Starting file watcher...') |
| 10 | call_command('collectstatic', '--noinput') |
| 11 | call_command('migrate') |
| 12 | start_servers() |
| 13 | watch_files() |