django-tablib
django-tablib copied to clipboard
Set .title base on model name
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))