I've got items in a list that a user can arbitrarily move around in
whatever order they want. Additionally, they can add a group of items
to a list in a specific position within that list.
Further, they can sort multiple items at once, meaning they can select
one to many, sequential or non-sequen
While I appreciate your response, your assumption is incorrect.
However, I've found the solution and it's rather easy.
The List Delete function closes gaps by setting an item.prev =
item.next and item.prev = item.next
The List Insert function injects item(s) either at the end of the list
(when the
Sorry I accidentally repeated myself.
List Delete closes gaps by setting item.prev = item.next and item.next
= item.prev.
On Oct 8, 5:03 am, Steven Sacks wrote:
> While I appreciate your response, your assumption is incorrect.
> However, I've found the solution and it's rath
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
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
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
6 matches
Mail list logo