Django Playing with API

77 views
Skip to first unread message

Habibu Yasin

unread,
Jan 1, 2024, 1:42:05 PM1/1/24
to Django users
hi every one,
I am new to Django working with the documentation on the part of dealing with API, I tried to add data via the shell,
“q = Question(question_text="What's new?", pub_date=timezone.now())”

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/macbookpro/Documents/Projects/Design/Python/myenv/lib/python3.11/site-packages/django/db/models/base.py", line 567, in __init__
    raise TypeError(
TypeError: Questions() got unexpected keyword arguments: 'question_text'

Please help

Ryan Nowakowski

unread,
Jan 2, 2024, 2:22:54 PM1/2/24
to django...@googlegroups.com
Show your code

Habibu Yasin

unread,
Jan 3, 2024, 12:47:57 AM1/3/24
to Django users
hi Ryan, thank you for  responding , but I did find the solution was a typo I did misspell the something in the code 
Reply all
Reply to author
Forward
0 new messages