1from .base import Card
2
3
4class TableCard(Card):
5 template_name = "admin/cards/table.html"
6 size = Card.Sizes.FULL
7
8 headers = []
9 rows = []
10 footers = []
11
12 def get_template_context(self):
13 context = super().get_template_context()
14 context["headers"] = self.get_headers()
15 context["rows"] = self.get_rows()
16 context["footers"] = self.get_footers()
17 return context
18
19 def get_headers(self):
20 return self.headers.copy()
21
22 def get_rows(self):
23 return self.rows.copy()
24
25 def get_footers(self):
26 return self.footers.copy()