django-countries: Person() takes exactly 1 argument (0 given)

后端 未结 2 1696
伪装坚强ぢ
伪装坚强ぢ 2021-01-28 15:34

I am trying to use the django-countries application with Django for the first time but I am getting this error which has me confused.

TypeError at /survey/

Per         


        
2条回答
  •  鱼传尺愫
    2021-01-28 16:20

    You have Person the model class and Person the function. Name one of them something else (and functions should not start with capitals anyway).

    Looks like Person the function requires a request parameter, which you're not passing in. I think you mean to be using Person the class, but the redefinition is confusing things.

提交回复
热议问题