@receiver(post_save, sender=Album) def album_save_handler(sender, instance, **kwargs): json.dump( {'name': instance.name, 'tags': instance.tags_()} , open('/tmp/info.txt', 'wb'), sort_keys=True)
And even like this:
@receiver(post_save, sender=Album) def album_save_handler(sender, instance, **kwargs): t = Album.objects.get(pk = instance.id).tags_()json.dump( {'name': instance.name, 'tags': t} , open('/tmp/info.txt', 'wb'), sort_keys=True)Still no luck, results are the same: previous tags instead of the current ones. Pre_save signal didn't help either.Maybe it's some bug?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment