Question

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

Was it helpful?

Solution

Return unicode object instead of str.

def related_label(self):
    return u'{0.getFullName} - {0.city}'.format(self)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top