I've already read a couple of questions regarding this issue but the solutions didn't work, forgive me if I've implemented them incorrectly.
basiclly i'm customizing the error that the django form displays
class UserForm(forms.ModelForm):
password = forms.CharField(widget=forms.PasswordInput())
confirm_password = forms.CharField(widget=forms.PasswordInput())
class Meta:
model = User
fields = ('username', 'email', 'password')
error_messages = {
'username': {
'unique': u"שם המשתמש שבחרת כבר קיים במערכת, נסה שם אחר",
},
}
I'm receiving the following error:
'charmap' codec can't encode characters in position 60-61: character maps to <undefined>
I've added these lines to the top as suggested, still doesn't work:
#-*- coding: utf-8 -*-
from __future__ import unicode_literals
any thoughts as to why it's not working?
Edit:
Ok i'm officaly tearing my hair out trying to fix this, all I want to do is display validation errors in heberew (my website is in hebrew) I've tried everything, I either get this error:
unsupported operand type(s) for %=: 'bytes' and 'dict'
or this one:
'charmap' codec can't encode character '\u05d0' in position 60: character maps to <undefined>
I need some help, please.