(self,
                 name,
                 user,
                 description=None,
                 query_string=None,
                 query_filter=None,
                 query_dsl=None)
Initialize the Search Template object.

        Args:
            name: The name of the timeline
            user: A user (instance of timesketch.models.user.User)
            description (str): Description of the search template
            query_string: The query string
            query_filter: The filter to apply (JSON format as string)
            query_dsl: A query DSL document (JSON format as string)
Initialize the Search Template object.
Initialize the Search Template object .
def __init__(self,
                 name,
                 user,
                 description=None,
                 query_string=None,
                 query_filter=None,
                 query_dsl=None):
        """Initialize the Search Template object.

        Args:
            name: The name of the timeline
            user: A user (instance of timesketch.models.user.User)
            description (str): Description of the search template
            query_string: The query string
            query_filter: The filter to apply (JSON format as string)
            query_dsl: A query DSL document (JSON format as string)
        """
        super().__init__()
        self.name = name
        self.user = user
        self.description = description
        self.query_string = query_string
        if not query_filter:
            filter_template = {
                'exclude': [],
                'indices': '_all',
                'terminate_after': 40,
                'order': 'asc',
                'size': '40'
            }
            query_filter = json.dumps(filter_template, ensure_ascii=False)
        self.query_filter = query_filter
        self.query_dsl = query_dsl
def __init__ ( self , name , user , description = None , query_string = None , query_filter = None , query_dsl = None ) : super ( ) . __init__ ( ) self . name = name self . user = user self . description = description self . query_string = query_string if not query_filter : filter_template = { 'exclude' : [ ] , 'indices' : '_all' , 'terminate_after' : 40 , 'order' : 'asc' , 'size' : '40' } query_filter = json . dumps ( filter_template , ensure_ascii = False ) self . query_filter = query_filter self . query_dsl = query_dsl