django ValueError: invalid literal for int() with base 10: ''

前端 未结 2 876
醉酒成梦
醉酒成梦 2021-01-24 03:22

I have an issue with my site, receiving this error pretty often. It\'s the first time i\'ve run into this and maybe someone can shed some light as to why?

Traceb         


        
相关标签:
2条回答
  • 2021-01-24 03:50

    count is the empty string. You need to compensate for the possibility that count could be a non-integer string.

    0 讨论(0)
  • 2021-01-24 04:03

    You need to check URL in your template. you need to pass the integer id to url {{user.id}} because url need to have integer value in template. Ex. url:- /polls/{{user.id}}/

    And in template first check your getting id or not like anywhere in template type sdhajdhgsjgd {{user.id}} kejhksdbjf and check your getting the integer value or not.

    Hope this will work for others.

    0 讨论(0)
提交回复
热议问题