[Django]-DjangoUnicodeDecodeError in administration with DEBUG=False

5👍

I have it 😉

In admin.py I have own form for MultipleChoiceField:

people = forms.ModelMultipleChoiceField(
    Person.objects.all(),
    widget=FilteredSelectMultiple("Účastníci", False, attrs={'rows': '10'})
)

class Meta:
    model = Event

Even if I had

# -*- coding: utf-8 -*-

on the beginning of the file, “Účastníci” made troubles. When I changed it to “Ucastnici”, everything works fine.

👤yetty

-1👍

I found experimentally that the error is debug_toolbar. With DEBUG=True debug_toolbar disabled

Leave a comment