Radim Novotny
unread,Jul 20, 2010, 5:52:10 AM7/20/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-multilingual
Hello,
I'm using django-multilingual and I'd like to create custom post_save
hook to my translated model class. It works fine, but there are no
translated data available in kwargs['instance'] object. Multilingual
behaviour works fine in admin interface and on the site though.
class Game(models.Model):
order = models.IntegerField(_('Order'))
class Translation(multilingual.Translation):
title = models.CharField(_('Game title'), max_length=255,
db_index=True)
def game_added(sender, **kwargs):
if kwargs['created']:
instance = kwargs['instance']
print instance.title
post_save.connect(game_added, sender = Game)
prints out None. The order field and pk are correctly set-up. Am I
doing something wrong or this is a bug?
Thanks,
Radim