Re: Changemanipulator takes 15 seconds to execute

2009-04-03 Thread Karen Tracey
On Wed, Apr 1, 2009 at 5:34 PM, Miguel wrote: > Hi Karen, > i didn't want to bother you too much (because of that I dindnt send too > much code). > But without specifics on the model involved here there's nothing more I can think to tell you that might help. raw_id_admin on any (all) related ob

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Miguel
Hi Karen, i didn't want to bother you too much (because of that I dindnt send too much code). I think these model are bad implemented. I have put the raw_id_admin parameter to true but the point is that I have too many queries: >>> len(connection.queries) 53 and some of them, all that goes to s

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 1:35 PM, Miguel wrote: > sorry karen. I have tried both. First I put in teh forma_parte_de foreing > key field but it has no discernible effect on performance. I even execute it > via python console and you can see clearly that it takes long time to > response. > > Then I t

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Miguel
sorry karen. I have tried both. First I put in teh forma_parte_de foreing key field but it has no discernible effect on performance. I even execute it via python console and you can see clearly that it takes long time to response. Then I tried to put the raw parameter in the many to many fields bu

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 1:03 PM, Miguel wrote: > umm, raw_id_admin takes no effect. I think I have found the problem. As you > said it may be in the model: > > Pattern_method model has this entry definition: > > metodos_embebidos = > models.ManyToManyField('Plantilla_metodo_embebido',blank=Tru

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Miguel
umm, raw_id_admin takes no effect. I think I have found the problem. As you said it may be in the model: Pattern_method model has this entry definition: metodos_embebidos = models.ManyToManyField('Plantilla_metodo_embebido',blank=True,null=True) and Plantilla_metodo_embebido has more than 10

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Karen Tracey
On Wed, Apr 1, 2009 at 10:52 AM, Miguel wrote: > I don really understand the raw_id_admin issue. I have read the api but it > is still not clear. > > You meant I could improve the behaviour by adding this paramter? > > forma_parte_de = > models.ForeignKey('Plantilla_bloque',related_name='dentro_

Re: Changemanipulator takes 15 seconds to execute

2009-04-01 Thread Miguel
I don really understand the raw_id_admin issue. I have read the api but it is still not clear. You meant I could improve the behaviour by adding this paramter? forma_parte_de = models.ForeignKey('Plantilla_ > > bloque',related_name='dentro_de',blank=True,null=True, raw_ide_admin=true) And ma

Re: Changemanipulator takes 15 seconds to execute

2009-03-31 Thread Karen Tracey
On Tue, Mar 31, 2009 at 11:17 AM, Miguel wrote: > > where should I put "raw_id_admin=True" ? in the foreing key declaration? > > forma_parte_de = > models.ForeignKey('Plantilla_bloque',related_name='dentro_de',blank=True,null=True) > > and what implications does it have? > Sorry, I meant to inc

Re: Changemanipulator takes 15 seconds to execute

2009-03-31 Thread Miguel
where should I put "raw_id_admin=True" ? in the foreing key declaration? forma_parte_de = models.ForeignKey('Plantilla_bloque',related_name='dentro_de',blank=True,null=True) and what implications does it have? thank you Miguel Sent from Madrid, Spain On Tue, Mar 31, 2009 at 4:21 PM, Karen

Re: Changemanipulator takes 15 seconds to execute

2009-03-31 Thread Karen Tracey
On Tue, Mar 31, 2009 at 9:52 AM, Miguel wrote: > hi, > > I have found an optimizing problem. I have a model which i would like to > edit, when I call my method I do something like this: > > > def method_modify(request, method_id): > > try: >manipulator = Pattern_method.ChangeManipula

Changemanipulator takes 15 seconds to execute

2009-03-31 Thread Miguel
hi, I have found an optimizing problem. I have a model which i would like to edit, when I call my method I do something like this: def method_modify(request, method_id): try: manipulator = Pattern_method.ChangeManipulator(method_id) except Pattern_method.DoesNotExist: r