\r
class CountryTable(tables.ModelTable):\r
name = tables.Column(data=lambda d: "hidden")\r
+ tld = tables.Column(data='example_domain', name="domain")\r
default_and_data = tables.Column(data=lambda d: None, default=4)\r
class Meta:\r
model = Country\r
# to correct model column; can be used to rewrite what is displayed\r
countries.order_by = 'name'\r
assert countries.order_by == ('name',)\r
+ # [bug 282964] this trick also works if the callable is an attribute\r
+ # and we refer to it per string, rather than giving a function object\r
+ countries.order_by = 'domain'\r
+ assert countries.order_by == ('domain',)\r
\r
def test_pagination():\r
"""Pretty much the same as static table pagination, but make sure we\r