stashboard/models.py
def rest(self, base_url):
        """ Return a Python object representing this model"""

        m = {}
        m["sid"] = self.sid()

        stamp = mktime(self.start.timetuple())
        m["timestamp"] = format_date_time(stamp)
        m["status"] = self.status.rest(base_url)
        m["message"] = unicode(self.message)
        m["url"] = base_url + self.resource_url()

        if self.informational:
            m["informational"] = self.informational
        else:
            m["informational"] = False

        return m
 Return a Python object representing this model
Return a Python object representing this model
Return a Python object representing this model
def rest(self, base_url):
        m = {}
        m["sid"] = self.sid()
        stamp = mktime(self.start.timetuple())
        m["timestamp"] = format_date_time(stamp)
        m["status"] = self.status.rest(base_url)
        m["message"] = unicode(self.message)
        m["url"] = base_url + self.resource_url()
        if self.informational:
            m["informational"] = self.informational
        else:
            m["informational"] = False
        return m
def rest ( self , base_url ) : m = { } m [ "sid" ] = self . sid ( ) stamp = mktime ( self . start . timetuple ( ) ) m [ "timestamp" ] = format_date_time ( stamp ) m [ "status" ] = self . status . rest ( base_url ) m [ "message" ] = unicode ( self . message ) m [ "url" ] = base_url + self . resource_url ( ) if self . informational : m [ "informational" ] = self . informational else : m [ "informational" ] = False return m
Return a Python object representing this model
Return a Python object representing this model
""" Return a Python object representing this model"""
self
base_url