Hello everybody,

I need to create dinamic content in several models. I have 3
approaches:

approach 1:

class News(models.Model):
    date = ...
    visible = ...
    text = models.CharField(max_length=255)

class NewsTrans(models.Model):
    news = models.ForeignKey(News)
    lang = models.CharField(max_length=5, choices=settings.LANGUAGES)
    text = models.CharField(max_length=255)


approach 2:
class News(models.Model):
    lang = models.CharField(max_length=5, choices=settings.LANGUAGES)
    date = ...
    visible = ...
    text = models.CharField(max_length=255)

approcah 3:
class NewsBase():
    date = ...
    visible = ...

class News(NewsBase):
    lang = models.CharField(max_length=5, choices=settings.LANGUAGES)
    text = models.CharField(max_length=255)

(Any other approaches are welcome.)

The one I like the least is the second one.

I really need help here, please tell me how to implement translations
in ddbb in the most efficient way.

Thank you.

P.S. I hope Django can manage this problem, hopefully in 1.3!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to