I'm doing a personal app for myself that tracks academic papers I've
read. As is the style these days, I can apply multiple tags to each
paper. My basic model is this:
class Tag(models.Model):
name = models.CharField(maxlength=200, core=True, unique=True)
class Paper(models.Model):
title = models.CharField(maxlength=200)
tags = models.ManyToManyField(Tag)
What I'd like to be able to do is get "Related Tags" like they have in
del.icio.us, ie. for a given Tag, I need a reasonably efficient way to
find all the other tags that it's ever been used with.
I've done very little SQL in my career, so I'm not even sure of the
best way to do this with raw SQL.
Any thoughts?
Jay P.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---