(domain, event)
return result
:param event: An instance of a subclass of corehq.messaging.scheduling.models.abstract.Event
:param event: An instance of a subclass of corehq.messaging.scheduling.models.abstract.Event
: param event : An instance of a subclass of corehq . messaging . scheduling . models . abstract . Event
def compute_initial(domain, event):
        """
        :param event: An instance of a subclass of corehq.messaging.scheduling.models.abstract.Event
        """
        result = {}

        if isinstance(event, TimedEvent):
            result['day'] = event.day + 1
            result['time'] = event.time.strftime('%H:%M')
        elif isinstance(event, RandomTimedEvent):
            result['day'] = event.day + 1
            result['time'] = event.time.strftime('%H:%M')
            result['window_length'] = event.window_length
        elif isinstance(event, CasePropertyTimedEvent):
            result['day'] = event.day + 1
            result['case_property_name'] = event.case_property_name
        elif isinstance(event, AlertEvent):
            result['minutes_to_wait'] = event.minutes_to_wait
        else:
            raise TypeError("Unexpected event type: %s" % type(event))

        result.update(ContentForm.compute_initial(domain, event.content))

        return result
def compute_initial ( domain , event ) : result = { } if isinstance ( event , TimedEvent ) : result [ 'day' ] = event . day + 1 result [ 'time' ] = event . time . strftime ( '%H:%M' ) elif isinstance ( event , RandomTimedEvent ) : result [ 'day' ] = event . day + 1 result [ 'time' ] = event . time . strftime ( '%H:%M' ) result [ 'window_length' ] = event . window_length elif isinstance ( event , CasePropertyTimedEvent ) : result [ 'day' ] = event . day + 1 result [ 'case_property_name' ] = event . case_property_name elif isinstance ( event , AlertEvent ) : result [ 'minutes_to_wait' ] = event . minutes_to_wait else : raise TypeError ( "Unexpected event type: %s" % type ( event ) ) result . update ( ContentForm . compute_initial ( domain , event . content ) ) return result