In [1]: s = b'\xd0\x9c\xd0\xbe\xd0\xbd\xd0\xb5\xd1\x82\xd0\xb0'
In [2]: s.decode('utf-8')
Out[2]: 'Монета'
def get_form_kwargs(self):
kwargs = super(SkillTestCreateView, self).get_form_kwargs()
kwargs['employee_pk'] = self.kwargs['pk']
return kwargs
class SkillGroupCreateForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
employee_pk = kwargs.pop('employee_pk', None) #
super(SkillGroupCreateForm, self).__init__(*args, **kwargs)
self.fields['technology'].required = False
if employee_pk:
# Код дальше