Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wish: be able to redefine existing fields as translatable #44

Open
vdboor opened this issue Nov 3, 2014 · 2 comments
Open

Wish: be able to redefine existing fields as translatable #44

vdboor opened this issue Nov 3, 2014 · 2 comments

Comments

@vdboor
Copy link
Contributor

vdboor commented Nov 3, 2014

Based on the reports #38 and #39.

It's not possible to redefine fields as translatable if they also exist on the shared model.

  • The official procedure is adding the translatable fields, and then removing the fields from the shared model.
  • When overriding third-party models currently requires using different names for those fields (e.g. django-oscar, see https://gist.github.com/vdboor/46348490c7cd1a5b08f4).

The following could be improved:

@skirsdeda
Copy link
Contributor

Any news on this?
Currently I am searching for a solution how to translate django-filer fields (reusing existing fields) and I have 2 options:
a) use a metaclass hack in #38 and create custom models for all models I need, then override a bunch of admin stuff, etc.
b) fork django-filer, make everything translatable by default and hope that I end up with something pull-request worthy :)
What would be your recommendations in this case?

@vdboor
Copy link
Contributor Author

vdboor commented Feb 23, 2015

Nope, I haven't looked deeper into this. It's a very hard topic, because removing a fields is not supported by Django at all. For third party apps, this would also break any ORM .filter(..) call on those removed fields.

Currently there is a discussion about overriding abstract-model fields on the django-developers mailinglist, which also raises interesting points.

As for recommendations, you can go either way. My personal favorite would be persuading the django-filer author if he has interest in receiving multilingual support for his application. Since you're willing to do the work, this has a higher chance of getting accepted.

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

No branches or pull requests

2 participants