1👍
✅
That was simple and i am surprised that no answers:
i need to use raw Pymongo:
wallpost.save()
is not correct, because save django model with predefined fields
VkWallPost._get_collection().insert(vk_post)
this is correct – we use raw pymongo insert
0👍
Well, did you see what do you have in wallposts variable?
Cause, I think, error message is pretty clear: in cycle variable wallpost you have int value. And, of course, trying to call save() will throw exception. May be, objects in wallposts have integer indices, do you think?
Try to print what you have in wallposts.
- [Answer]-Check admin login on my django app
- [Answer]-Post to API before saving to database in django class-based views
- [Answer]-Django rest framework post – Invalid drive specification
Source:stackexchange.com