Error: “dictionary update sequence element #0 has length 1; 2 is required” on Django 1.4

后端 未结 14 1082
梦如初夏
梦如初夏 2020-11-29 21:43

I have an error message on django 1.4:

dictionary update sequence element #0 has length 1; 2 is required

[EDIT]

It happe

14条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 22:29

    I faced the above mentioned problem when I forgot to pass a keyword argument name to url() function.

    Code with error

     url(r"^testing/$", views.testing, "testing")
    

    Code without error

    url(r"^testing/$", views.testing, name="testing")
    

    So finally I removed the above error in this way. It might be something different in your case. So check your url patterns in urls.py.

提交回复
热议问题