def __init__(self, *args, **kwargs):
        initial = kwargs.get('initial', {})
        instance = kwargs.get('instance', None)

        # Set a default publish time and the current site if it is a new object
        if not instance and not 'publish_date' in initial:
            initial['publish_date'] = datetime.datetime.now().date()
        if not instance and not 'publish_time' in initial:
            initial['publish_time'] = datetime.datetime.now().time().strftime('%H:%M:%S')
        if not instance and not 'site' in initial:
            initial['site'] = Site.objects.get_current().id

        kwargs.update({'initial': initial})
        super(StoryForm, self).__init__(*args, **kwargs)
dataset/ETHPy150Open callowayproject/django-stories/stories/forms.py/StoryForm.__init__/original