1👍
✅
Have you tried the following code:
obj = SomeModel(None, "a_stuff", "b_stuff", "c_stuff", "d_stuff", "e_stuff", "f_stuff")
obj.save()
Hope these helps.
0👍
you can create instance by doing
abcdef = SomeModel()
Since instantiating doesnot touch the database, you can assign values later and then do .save()
.
- [Answer]-My SQLite database is not recognized : "no such table myapp_onemodel"
- [Answer]-How to display foreignkey image in django
- [Answer]-Heroku – internal server error
Source:stackexchange.com