Saturday, September 20, 2014

Re: unicode problems in admin interface

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlQd69wACgkQnKyV+QSePJaniACeO9gSDtRZ4+d7c2kdbElUjffV
z7AAn0YDxinZnQVkWQEOXPE0VWuQxy1Y
=6Wb6
-----END PGP SIGNATURE-----
Op 2014-09-19T15:58:59 UTC schreef Collin Anderson
<cmawebsite@gmail.com> in het bericht <Re: unicode problems in admin
interface>, ID: <f2c7c2e5-9d58-4e31-a015-45eb38b0bbba@googlegroups.com>
interface> het volgende.

> Are you uploading a file using apache? It could be
> the /etc/apache2/envvars issue.

No, it is an issue with Django/admin.

> Are you ever using string formatting like "something %s something" %
> something ? If so, use unicode_literals or change that to a unicode
> string: u"something %s something" % something

models.py:
"...
def img(self):
return format_html(u'<a href="/foto/{2}" target="_blank"><img
title="{1}" height="80"
src="http://glaskunst.liakoster.nl/media/img/height_80/{2}.jpg"/></a>',
self.id,self.photograph)
image.allow.tags = True
def __unicode__(self):
return self.photograph
..."

Coulld it be a bug in Django 1.7?


--

Jaap van Wingerde
e-mail: 1234567890@vanwingerde.nl

No comments:

Post a Comment