# coding=utf-8

from django.core.management import BaseCommand
from hippo.models import Doctor, DoctorRegister


class Command(BaseCommand):
    """
        清空doctor，doctorregister的职称
        python manage.py empty_doctor_title
    """
    def handle(self, *args, **options):
        doctors = Doctor.objects.all()
        doctors.update(title=u'0')
        doctorregisters = DoctorRegister.objects.all()
        doctorregisters.update(title=u'0')

        print 'Done!'
