# coding: utf-8
from __future__ import absolute_import, unicode_literals, print_function

from django.core.management import BaseCommand
from gm_types.gaia import TAG_TYPE

from api.models import SeoCategory


class Command(BaseCommand):
    def handle(self, *args, **kwargs):
        seocategories = SeoCategory.objects.exclude(
            category_type__in=[
                TAG_TYPE.BODY_PART,
                TAG_TYPE.BODY_PART_SUB_ITEM,
                TAG_TYPE.ITEM_WIKI
            ]
        )
        seocategories.update(is_online=False)
