#NEWLINE# @ classmethod #NEWLINE# def from_db_model( cls , m , host_url ) : #NEWLINE# #INDENT# json = m . as_dict ( ) #NEWLINE# json [ 'type' ] = m . __tablename__ #NEWLINE# json [ 'uri' ] = ( '%s/v1/%s/%s' % ( host_url , m . __resource__ , m . uuid ) ) #NEWLINE# del json [ 'id' ] #NEWLINE# return cls ( ** json )