google-code-export / django-modeltranslation

Automatically exported from code.google.com/p/django-modeltranslation
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Translation Fields Not Added to Child Classes #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new non-abstract class Base with one field, 'text'.  
2. Create two subclasses S1 and S2.
3. Create some Base, S1 and S2 objects with values in their text fields.
4. Register the 'text' field in Base for translation.
5. Add two languages to settings.py, en (the default) and es.
6. Update the database to add fields for text_en and text_es in the Base table.
7. Run the django shell.
8. Try dir() statements of Base, S1 and S2 objects.

What is the expected output? What do you see instead?
Expect that dir(Base object), dir(S1 object), and dir(S2 object) will all show 
text_en and text_es fields.  Instead, only the Base class has both fields.  S1 
and S2 have text_en, but not text_es.

What version of the product are you using? On what operating system?
Using modeltranslation-0.2 with Django 1.1.2 on Mac OS 10.5.8.

Please provide any additional information below.
Similar to Issue #50, but I am finding that the translation fields actually are 
added to my base class, not to the subclasses.

I followed the steps above to recreate my original problem, which was that one 
of the children had both text_en and text_es, but the other child only had 
text_en.  I'm not sure why inheritance worked for one of the children in my 
original code, but the fact that it doesn't work at all when I recreate from 
scratch makes me think the problem isn't just with my code.

Original issue reported on code.google.com by katrina....@gmail.com on 8 Oct 2010 at 3:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, this is directly related to issue 50. The multi-table inheritance support 
has to be fixed in general.

Original comment by eschler on 26 Oct 2010 at 8:30

GoogleCodeExporter commented 9 years ago

Original comment by eschler on 10 Apr 2011 at 9:51

GoogleCodeExporter commented 9 years ago
Resolved in r111.

Original comment by eschler on 1 Jun 2011 at 3:28