mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-05-10 06:14:43 +00:00
It can be used with ``get_or_create`` (without resaving) and, more importantly, fixture loading. Extend population by providing two new modes: ``default`` that sets just the default translation (only if its not given; ensuring a fallback is available; alike ``update_translation_fields``) and ``required`` that further limits population by only filling default translation of non-nullable fields (minimum to keep some level of consistency). Add a ``populate(mode)`` toggle on multilingual query set / manager and an ``auto_populate`` context manager for fixture loading.
10 lines
153 B
JSON
10 lines
153 B
JSON
[
|
|
{
|
|
"pk": 1,
|
|
"model": "tests.TestModel",
|
|
"fields": {
|
|
"title": "foo",
|
|
"text": "bar"
|
|
}
|
|
}
|
|
]
|