Skip to content

(UPDATE) prevent of using i18n field as form field#53

Open
dfirst wants to merge 2 commits into
zostera:masterfrom
dfirst:UPDATE_prevent_using_i18n_virt_field_as_form_field
Open

(UPDATE) prevent of using i18n field as form field#53
dfirst wants to merge 2 commits into
zostera:masterfrom
dfirst:UPDATE_prevent_using_i18n_virt_field_as_form_field

Conversation

@dfirst

@dfirst dfirst commented May 5, 2019

Copy link
Copy Markdown
Contributor

Why i did it.

  1. We have this line https://github.com/zostera/django-modeltrans/blob/master/modeltrans/translator.py#L138, currently flag (editable=False) did nothing because it isnt set to TranslatedVirtualField.
  2. I think in case if we need active language model form we need to force user to use solution like ActiveLanguageMixin.
  3. Also i18n virtual form field can be unpredictable in case of (required=False) because its always (blank | null = True).

Alternative of this solution can be using some kind of lazy form field.

What do you think?

@coveralls

coveralls commented May 5, 2019

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at ?% when pulling 8a629ab on dfirst:UPDATE_prevent_using_i18n_virt_field_as_form_field into 862d4f5 on zostera:master.

@dfirst dfirst force-pushed the UPDATE_prevent_using_i18n_virt_field_as_form_field branch from e3199cd to 8a629ab Compare May 17, 2019 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants