On 4 Mar, 01:19, Steven Sacks wrote:
> Here is my model:
>
> class PlaylistTag(models.Model):
> playlist = models.ForeignKey(Playlist)
> tag = models.CharField(max_length=128)
> tag_count = models.PositiveIntegerField(default=1)
>
> The way this model works is simple. If you add a ta
Also, I need to get back Playlist records (hence the
select_releated()).
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-us
If it helps, this is, I believe, somewhat equivalent SQL:
SELECT
playlist_id, tag, SUM(tag_count) score
FROM
playlist_tag
WHERE
tag like '%query%'
GROUP BY
playlist_id
ORDER BY
score DESC
--
You received this message because you are subscribed to the Google Groups
"Django users" group
Here is my model:
class PlaylistTag(models.Model):
playlist = models.ForeignKey(Playlist)
tag = models.CharField(max_length=128)
tag_count = models.PositiveIntegerField(default=1)
The way this model works is simple. If you add a tag to a playlist,
and the tag doesn't exist, the tag_c
4 matches
Mail list logo