Parameterised classes in Python
Recently, when working with Django, I wanted to create a class that would automatically render instances of a model as an editable HTML table. I used a Django-esque approach to defining the table columns, such that it was similar to Model and Form classes:
class ProductTable(Table): _model = Product name [...]