django-tablib icon indicating copy to clipboard operation
django-tablib copied to clipboard

Set .title base on model name

Open olivergeorge opened this issue 14 years ago • 0 comments

Perhaps you could set the title to the model name. That way when people use multiple sheets in a databook the sheet names are something sensible.

cheers, Oliver

business_data = SimpleDataset(Business.objects.all(), headers=None) discount_data = SimpleDataset(Discount.objects.all(), headers=None)

business_data.title = "Businesses" discount_data.title = "Discounts"

book = tablib.Databook((business_data, discount_data))

olivergeorge avatar Sep 09 '11 06:09 olivergeorge