Re: Negate querysets

2010-03-24 Thread Vinicius Mendes | meiocodigo.com
Ok. I thought it was more simple. I don't know the ORM in deep and forgot about the extra() method. Thanks for the explanation. On Mar 23, 5:15 pm, James Bennett wrote: > On Tue, Mar 23, 2010 at 10:21 AM, Vinicius Mendes | meiocodigo.com > > wrote: > > integrated to the fr

Re: Negate querysets

2010-03-23 Thread Vinicius Mendes | meiocodigo.com
Paulo > > On Tue, Mar 23, 2010 at 1:23 PM, Vinicius Mendes | meiocodigo.com < > > > > vbmen...@gmail.com> wrote: > > Ok. The code proposed by Tim Shaffer works and gives only one query. > > But it makes use of subselects, what is heavy for the database. Take a > &g

Re: Negate querysets

2010-03-23 Thread Vinicius Mendes | meiocodigo.com
Ok. The code proposed by Tim Shaffer works and gives only one query. But it makes use of subselects, what is heavy for the database. Take a look at the generated SQL: 'SELECT `auth_user`.`id`, `auth_user`.`username`, `auth_user`.`first_name`, `auth_user`.`last_name`, `auth_user`.`email`, `auth_use

Re: Model design

2009-10-26 Thread Vinicius Mendes | meiocodigo.com
> subplaces are not changed frequently so i can live with it for the > time being and move to more important parts until I am more familiar > with the forms. > > I just need to know how to call the a related field in __unicode__ > (self) > > On Oct 25, 2:30 pm, "Vinicius Me

Re: Model design

2009-10-25 Thread Vinicius Mendes | meiocodigo.com
ve the subplaces based in the selected > > place. > > I am not so sure how to do that yet. However, i would like to know how > i could not return the related object name in __unicode__ . Where did > I go wrong? > > Thanks > > On Oct 24, 1:38 pm, "Vinicius Mende

Re: Model design

2009-10-24 Thread Vinicius Mendes | meiocodigo.com
On Oct 24, 7:14 am, Caisys wrote: > Thanks !!! I also felt the second sounds more "right" which leads to > two requirements, the first is for convenience but the second is a > must: > > 1) On the admin page for add Place I will put 2 or 3 slots for adding > Subplace to a place ... is there a wa