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

        m = {}
        m["name"] = unicode(self.name)
        m["id"] = unicode(self.slug)
        m["description"] = unicode(self.description)
        m["url"] = base_url + self.resource_url()

        event = self.current_event()
        if event:
            m["current-event"] = event.rest(base_url)
        else:
            m["current-event"] = None

        if self.list:
            m["list"] = self.list.rest(base_url)
        else:
            m["list"] = None

        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["name"] = unicode(self.name)
        m["id"] = unicode(self.slug)
        m["description"] = unicode(self.description)
        m["url"] = base_url + self.resource_url()
        event = self.current_event()
        if event:
            m["current-event"] = event.rest(base_url)
        else:
            m["current-event"] = None
        if self.list:
            m["list"] = self.list.rest(base_url)
        else:
            m["list"] = None
        return m
def rest ( self , base_url ) : m = { } m [ "name" ] = unicode ( self . name ) m [ "id" ] = unicode ( self . slug ) m [ "description" ] = unicode ( self . description ) m [ "url" ] = base_url + self . resource_url ( ) event = self . current_event ( ) if event : m [ "current-event" ] = event . rest ( base_url ) else : m [ "current-event" ] = None if self . list : m [ "list" ] = self . list . rest ( base_url ) else : m [ "list" ] = None 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