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

export to xls: relational field values don't use __unicode__ #51

Closed
asfaltboy opened this issue Apr 14, 2014 · 1 comment
Closed

export to xls: relational field values don't use __unicode__ #51

asfaltboy opened this issue Apr 14, 2014 · 1 comment

Comments

@asfaltboy
Copy link
Contributor

When passing the unformatted value of a relational field, xlwt writes an error Unexpected data type <class ...> into the cell. Export to CSV displays these values correctly, since it's passing the values through the smart_str helper.

@asfaltboy asfaltboy mentioned this issue Apr 14, 2014
@farzadab
Copy link

theres a quick fix :

in line 93 of 'utils.py' you can add these lines :

if isinstance(value, models.Model) :
return value.unicode()

saxix added a commit that referenced this issue Aug 1, 2014
saxix added a commit that referenced this issue Aug 1, 2014
* release/0.6:
  bump 0.6
  add django 1.7 and trunk to travis
  fixes transaction management
  fixes Makefile after removal of casperjs
  removed get_usermodel() call ad Django 1.4 does not have it
  fixes #55, #51
  fixes #55
  fix for xls, csv export (fk error, astimezone error)
  open 0.6

Conflicts:
	adminactions/api.py
@saxix saxix closed this as completed Aug 1, 2014
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

3 participants