You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for the ticket.
Please check last commit, just added utility callback get__filename() handler. If the ModelAdmin has this attribute it is called (passing request and queryset) to get the filename. Otherwise each not valid char in verbose_name is substituted by '?'
Hi,
I play with django-adminactions and it's really a nice job, thanks!
However for an application with french translation, CSV Export raise a UnicodeEncodeError if verbose_name_plural use non ascii characters.
Django Version: 1.4.3
Exception Type: UnicodeEncodeError
Exception Value:
'ascii' codec can't encode character u'\xe8' in position 25: ordinal not in range(128), HTTP response headers must be in US-ASCII format
The problem is located at this line in export.py
:
filename = "%s.csv" % queryset.model.meta.verbose_name_plural.lower().replace(" ", "")
I fix it for my app by using a generic filename for exports.
The text was updated successfully, but these errors were encountered: