django-modeltranslation
django-modeltranslation copied to clipboard
Doesn't create objects model with field_??
I can't create object with title_en and etc in my custom script. When i run blog.objects.create(title=title, author = user) in db title_en is NULL. And blog.objects.create(title_en=title, author = user) get error TypeError: 'title_en' is an invalid keyword argument for this function. Create in admin form is ok. But need created many blogs. How i can do this without forms?
P. S. django = 1.8, modeltranslation = 0.9.1
don't you have to use: blog.objects.populate(True).create(title=title, author = user) ?
TypeError: 'title_en' sounds like modeltranslation hasn't been triggered (imported).
How is your script run? Does it perform Django setup(), and is modeltranslation in INSTALLED_APPS?
Moreover, is English an active language in script context?