[Django]-ValueError: not enough values to unpack (expected 2, got 1)

4๐Ÿ‘

jj_choice = {
    '็“ถ': '็“ถ',
    'ๅŒ…': 'ๅŒ…',
    '็›’': '็›’',
}

should be written as,

jj_choice = (
    ('็“ถ', '็“ถ'),
    ('ๅŒ…', 'ๅŒ…'),
    ('็›’', '็›’'),
)

key,text tuples.

๐Ÿ‘คdurdenk

0๐Ÿ‘

you have

return render(request, 'medicine/add.html', {'form': form},)

you need

return render(request, 'medicine/add.html', {'form': form})

, at the end makes it tuple

๐Ÿ‘คdoniyor

Leave a comment