You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
514 B
16 lines
514 B
# -*- coding: utf-8 -*-
|
|
from django.core.management.base import NoArgsCommand
|
|
from django.utils.translation import activate
|
|
from service.models import LinkedService
|
|
|
|
|
|
class Command(NoArgsCommand):
|
|
"""
|
|
Команда для офлайн обновления услуг событий
|
|
"""
|
|
def handle_noargs(self, **options):
|
|
activate('ru')
|
|
services = list(LinkedService.objects.select_related('service').all())
|
|
|
|
for service in services:
|
|
service.update_all_flags()
|
|
|