many-to-many query

2007-09-26 Thread Nabuco
Cheers everybody, I have two tables (video, videokeyword) involved in a many2many relationship which results in a 3rd table (video_keywords_list). A video element can have many keyword elements, and otherwise, a keyword element can have (be present) in many video elements. Structure is: app_vid

Re: many-to-many query

2007-09-27 Thread Nabuco
Thanks Tim, I canoot figure out why your code is not working for me... But I found that select vk.video_id, count(*) from dcrclips_video_keywords_list vk, dcrclips_videokeyword k where k.name in (keyword1,keyword2,etc...) and vk.videokeyword_id = k.id group by vk.video_id having count(*) = numbe

overriding checked value for CheckboxSelectMultiple widget

2007-09-30 Thread Nabuco
going to sleep, enough for tonight... zzz the subject is self-explanatory guys, I tried using attrs={'checked': something} but rendering is not on my side here, i falls to <... checked="checked" ...>, please gimme some light to this, and a little gift for tomorrow :) VideoForm.base_fields['k

deleting many2many relationship in object

2007-10-02 Thread Nabuco
Hi, given the models class VideoKeyword(models.Model): """Keywords assigned to video information.""" name = models.CharField(max_length=120) class Video(models.Model): """Videos, videos, videos! keywords_list = models.ManyToManyField(VideoKeyword) this many2many relationship cr

Re: deleting many2many relationship in object

2007-10-03 Thread Nabuco
Thanks a lot Russ, I am sometimes lazy reading documentation and miss things... cheers, hector On Oct 3, 1:44 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 10/3/07, Nabuco <[EMAIL PROTECTED]> wrote: > > > > > In a view I receive some vid

Adding extra info to HttpResponseRedirect

2007-10-03 Thread Nabuco
I have a view which receives a list of items in my app to be deleted. After the deletion, I need to return a page containing the same origin page plus a message like "the items (items here) have been successfully deleted". So, after doing all the required stuff in the view, if I want to avoid the

Upgraded python2.4 to python2.5 but Django still running on python2.4

2007-12-19 Thread Nabuco
Request URL:http://ftpadmin.azalorea.com/gallery/ Exception Type: AttributeError Exception Value:'unicode' object has no attribute 'partition' Exception Location: /aplicaciones/nabuco/ftpadmin/gallery/views.py in index, line 20 Python Executable: