| 24 | |
| 25 | class Message(models.Model): |
| 26 | message = models.TextField() |
| 27 | class Meta: |
| 28 | pass |
| 29 | class Admin: |
| 30 | pass |
| 31 | |
| 32 | class Translation(models.Model): |
| 33 | message = models.ForeignKey(Message, edit_inline=models.TABULAR) |
| 34 | language = models.CharField(maxlength=10) |
| 35 | translation = models.TextField(core=True) |
| 36 | |
| 37 | class Meta: |
| 38 | unique_together = (('language', 'message',),) |
| 39 | class Admin: |
| 40 | pass |
| 41 | |
| 42 | class Message2(models.Model): |
| 43 | message = models.TextField() |
| 44 | class Meta: |
| 45 | pass |
| 46 | class Admin: |
| 47 | pass |
| 48 | |
| 49 | class Registry(models.Model): |
| 50 | """ this model breaks Message """ |
| 51 | message = models.ForeignKey(Message2, edit_inline=True) |
| 52 | obj = models.CharField(maxlength=255, core=True) |
| 53 | field = models.CharField(maxlength=255) |
| 54 | |
| 55 | class Meta: |
| 56 | unique_together = (('obj', 'field'),) |
| 57 | class Admin: |
| 58 | pass |
| 59 | |
| 60 | |