import logging

from django.conf import settings
from django.core.management import BaseCommand
from django.utils import translation

from importer.functions import import_update
from mainapp.functions.notify_users import NotifyUsers

logger = logging.getLogger(__name__)


class Command(BaseCommand):
    help = (
        "To be called by an hourly cron job. Updates the oparl dataset and sends"
        " notifications to users.\nIf you want more control call the import_update and"
        " notify_users individually."
    )

    def handle(self, *args, **options):
        import_update()

        translation.activate(settings.LANGUAGE_CODE)

        notifier = NotifyUsers()
        notifier.notify_all()

8d74c376424d9c5d8cf21bf898d0500ef8efcde8
<mask token>


class Command(BaseCommand):
    <mask token>

    def handle(self, *args, **options):
        import_update()
        translation.activate(settings.LANGUAGE_CODE)
        notifier = NotifyUsers()
        notifier.notify_all()

<mask token>


class Command(BaseCommand):
    help = """To be called by an hourly cron job. Updates the oparl dataset and sends notifications to users.
If you want more control call the import_update and notify_users individually."""

    def handle(self, *args, **options):
        import_update()
        translation.activate(settings.LANGUAGE_CODE)
        notifier = NotifyUsers()
        notifier.notify_all()

<mask token>
logger = logging.getLogger(__name__)


class Command(BaseCommand):
    help = """To be called by an hourly cron job. Updates the oparl dataset and sends notifications to users.
If you want more control call the import_update and notify_users individually."""

    def handle(self, *args, **options):
        import_update()
        translation.activate(settings.LANGUAGE_CODE)
        notifier = NotifyUsers()
        notifier.notify_all()

import logging
from django.conf import settings
from django.core.management import BaseCommand
from django.utils import translation
from importer.functions import import_update
from mainapp.functions.notify_users import NotifyUsers
logger = logging.getLogger(__name__)


class Command(BaseCommand):
    help = """To be called by an hourly cron job. Updates the oparl dataset and sends notifications to users.
If you want more control call the import_update and notify_users individually."""

    def handle(self, *args, **options):
        import_update()
        translation.activate(settings.LANGUAGE_CODE)
        notifier = NotifyUsers()
        notifier.notify_all()

import logging

from django.conf import settings
from django.core.management import BaseCommand
from django.utils import translation

from importer.functions import import_update
from mainapp.functions.notify_users import NotifyUsers

logger = logging.getLogger(__name__)


class Command(BaseCommand):
    help = (
        "To be called by an hourly cron job. Updates the oparl dataset and sends"
        " notifications to users.\nIf you want more control call the import_update and"
        " notify_users individually."
    )

    def handle(self, *args, **options):
        import_update()

        translation.activate(settings.LANGUAGE_CODE)

        notifier = NotifyUsers()
        notifier.notify_all()
