[Fixed]-Django – Dictionary update sequence element #0 has length 1; 2 is required

56👍

The problem is this line:

url(r'^category/(?P<category_id>\d+)/$', 'category', 'category')

The third positional parameter is the extra context dict. If you want to pass the name instead, you need to use a keyword arg:

url(r'^category/(?P<category_id>\d+)/$', 'category', name='category')

Leave a comment