board = Board(name='Django', description='This is a board about Django.')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/babak/myproject/venv/lib/python3.6/site-packages/django/db/models/base.py", line 501, in __init__
raise TypeError("%s() got an unexpected keyword argument '%s'" % (cls.__name__, kwarg))
TypeError: Board() got an unexpected keyword argument 'description'
答案 0 :(得分:-1)
函数Board
不能将description
识别为参数。
也就是说,您的函数不接受相应的参数。
最好删除description
参数。