programmatically alter ManyToManyField?

2008-02-03 Thread Tuom
hello, i have two models, image and tag. in image there is also ManyToManyField with tag in its arguments. in admin, i can create new tags, new images and most importantly, alter which tags an image is connected with. but how to do this programmatically? i mean, how to connect/disconnect tags to

most popular adjacent tags

2008-01-31 Thread Tuom
dear list, let's say i have many tagged items (eg images or bookmarks). if i select one of them, and then i select a tag of the item, i would like to find all the items with this tag (including the selected one) and make a histogram out of the tags of found items (exluding the selected one), ie t