Re: creating first appl using django

2009-07-28 Thread aXqd
On Tue, Jul 28, 2009 at 4:31 PM, rekha wrote: > Hi, > im new to django. may anyone tell how to develop an web application > using django? I'm also new here. You can check out http://docs.djangoproject.com/en/dev/, and start to read the Overview/Installation/Tutorials. -- Regards. -Tian --~--~-

Re: Redundant SQL queries regarding DELETE ALL

2009-07-19 Thread aXqd
On Mon, Jul 20, 2009 at 12:00 PM, Alex Gaynor wrote: > > On Sun, Jul 19, 2009 at 9:51 PM, aXqd wrote: >> >> Hi, all: >> >> I encountered another redundant SQL query problem while using django. >> And this time it might even cause a defect of my own program. &

Redundant SQL queries regarding DELETE ALL

2009-07-19 Thread aXqd
Hi, all: I encountered another redundant SQL query problem while using django. And this time it might even cause a defect of my own program. Here is the thing. I want to do something like below: FOO.objects.filter( bar_id__exact = 5 ).delete() But what I got from mysql log are: 1 SELECT blahbl

Re: Foreign key triggered some redundant SQL queries

2009-07-19 Thread aXqd
在 2009-7-20,0:33,Alex Gaynor 写到: > > On Sun, Jul 19, 2009 at 10:48 AM, aXqd wrote: >> >> Hi, all: >> >> Recently, I linked two models ( FOO & BAR ) with a foreign key. >> Then I retrieved the whole records back with the following codes: >> &g

Foreign key triggered some redundant SQL queries

2009-07-19 Thread aXqd
Hi, all: Recently, I linked two models ( FOO & BAR ) with a foreign key. Then I retrieved the whole records back with the following codes: 1 for item in FOO.objects.all(): 2 print item.bar.id In my opinion, the whole thing should be lazy enough. So if Line 1 got all the BAR id back, *WHY* did