#!/usr/bin/env python
# -*- coding: utf-8 -*-

from django.core.management import BaseCommand
from api.models import SpecialSeckillButton 
from gm_types.gaia import RANGE_TYPE 


class Command(BaseCommand):

    def handle(self, *args, **kwargs):
        ss = SpecialSeckillButton.objects.filter(cities__isnull=False, range_type=RANGE_TYPE.WHOLE_CITY)
        ss.update(range_type=RANGE_TYPE.PARTIAL_CITY)
        print("script is end")
