views:

13

answers:

1

How can I know if a new tag is created for a model? Looks like the django-tagging API does not provide such method. I'm new to both Django and django-tagging app and would like to hear your advice.

Update: what I'm trying to acomplish is to add more properties to tags. I think to have another model TagProperties linked to Tag model. And every time the Tag is save I save the TagProperies as well.

+2  A: 

One way would be to use django signals. You could connect a post_save signal to the Tag model and handle that for when a new instance is created.

ars
ars, thanks for the answer. I'll try that out. BTW, I have updated the question and you may see another solution.
grigy
This should be fine: you can save your TagProperties object in the `post_save` handler.
ars