heya,
Hmm, I haven't thought about that. From what I can gather, the
"TaggedItem" model is what links "Tag" to your own model, via Generic
Relations - so it's basically the glue that binds the two.
I think adding another intermediary table between your model and
"TaggedItem" might break all the
I know django-tagging has the Tag model and the TaggedItem model. I wonder
if it would be possible to create the Many to Many relationship between your
Articles and this TaggedItem model, through a Ratings intermediary table. I
have no idea if that would work (and keep all the django-tagging
Paolo,
Thanks for the quick reply =).
I did think of that, just using a M2M, however, that means I lose all
of the inherent features of django-tagging. For our case, that would
probably be things like helpers to do auto-complete for tags,
automatically parsing form inputs with commas into tags,
A possible solution would be to create a Many To Many relationship between
articles and companies, with an intermediary model holding the ratings:
http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships
- Paulo
On Mon, Mar 22, 2010 at 2:41 AM, Victor
heya,
I have a small Django app we're writing to hold reviews of newspaper
articles.
With each article, there's an arbitrary number of companies or
keywords associated with those articles. And for each of those
companies/keywords, there's either a rating (out of 10), or possibly
no rating (i.e.
5 matches
Mail list logo