Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set .title base on model name #14

Open
olivergeorge opened this issue Sep 9, 2011 · 0 comments
Open

Set .title base on model name #14

olivergeorge opened this issue Sep 9, 2011 · 0 comments

Comments

@olivergeorge
Copy link

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant