Closed sergei-maertens closed 10 months ago
Migration fixes applied here too
Merged migration fixes, now please rebase this branch or merge master into it to resolve conflicts.
Sure, I'll be in the office in 30 mins and you can expect the rebase then
@last-partizan I've rebased and rewritten the commit messages to use conventional commit
Looks fine, but gitlab-ci is failing for the reasons unrelated to this PR. I'll try running it again later today.
If that doesn't work, i'll test it locally and merge tomorrow.
Is there anything else you want to check or fix before merging?
It looks fine to me, and i plan merge it tomorrow.
No, let's go for it!
On Thu, 7 Sep 2023, 14:51 Serhii Tereshchenko, @.***> wrote:
Is there anything else you want to check or fix before merging?
It looks fine to me, and i plan merge it tomorrow.
— Reply to this email directly, view it on GitHub https://github.com/deschler/django-modeltranslation/pull/700#issuecomment-1710098111, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKDJVU3YH44LKC2FR6ZANTXZG7NNANCNFSM6AAAAAA4EOS4UE . You are receiving this because you authored the thread.Message ID: @.***>
Closes #698, overlaps with #699 w/r to re-generated initial migrations
When django-modeltranslation creates the translation fields (foo_en, foo_de...) and the base field has a callable default set, any language-aware content is now translated with the field's language.
The mechanism is rather simple -
Field.get_default
is overridden to temporarily activatefield.language
.