MCPcopy Index your code
hub / github.com/clips/pattern / render

Method render

test/test_db.py:807–813  ·  view source on GitHub ↗
(self, query, **kwargs)

Source from the content-addressed store, hash-verified

805 self.setup()
806 self.table.insert(name="pizza", price=15.0)
807 def render(self, query, **kwargs):
808 q = self.table.search(fields=["name", "price"], filters=[("name", "*%s*" % query)])
809 s = []
810 for row in q.rows():
811 s.append("<tr>%s</tr>" % "".join(
812 ["<td class=\"%s\">%s</td>" % f for f in zip(q.fields, row)]))
813 return "<table>" + "".join(s) + "</table>"
814
815 # Assert View with automatic Table creation.
816 v = Products(self.db)

Callers 1

test_viewMethod · 0.95

Calls 4

zipFunction · 0.85
searchMethod · 0.45
rowsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected