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

from django.core.management import BaseCommand
from datetime import datetime

from polymer.models import PolymerContent


class Command(BaseCommand):
    def handle(self, *args, **options):
        for obj in PolymerContent.objects.all():
            if not obj.start_time and not obj.end_time:
                obj.start_time = datetime(2018, 07, 01, 0, 0, 0)
                obj.end_time = datetime(2018, 12, 31, 23, 59, 59)
                obj.save()


