I'm writing an application which has some of its data
translated to
different languages.
I've achieved this with a corresponding model to each main
model that
just holds translated data, much like the
django-multilingual library
(on google code).
But much of my data is not translated and so I maintain a
denormalised
copy of a preferred translation on the main model's table so
that
performance is not impacted so much when reading data in
these cases.
However to ensure synchronisation between the two versions
of the data
I've used the post_save dispatcher signal to write to the
other model
when they are each saved.
The only problem with this is that when i load fixture data
the other
version won't exist. So i fail silently when it tries to
update the
corresponding denormalised model from a translation model.
So I was wondering whether there was a way of determining
that the data
is being loaded from a fixture and so relax the
synchronisation code
only in that situation?
Any other opinions on this approach would also be welcomed
thanks,
Graham
--~--~---------~--~----~------------~-------~--~----~
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-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|