Ara Sivaneswaran
Ara Sivaneswaran

Reputation: 375

Django Grappelli - Autocomplete and french accents

I have some problems with Django Grappelli Autocomplete.

It works just fine but for some reason, if the name has french accents (é,è,etc) the field shows an '?'.

Here is the screenshot:

http://gyazo.com/64dfb579ccf9e11c0f0d9ee8337edec4

Here is my related label:

    def related_label(self):
    return str(self.getFullName)+" - "+ str(self.city)

Thanks

Upvotes: 0

Views: 154

Answers (1)

falsetru
falsetru

Reputation: 369394

Return unicode object instead of str.

def related_label(self):
    return u'{0.getFullName} - {0.city}'.format(self)

Upvotes: 0

Related Questions