Hello people :)
I am struggling with optimizing an admin with inlines which causes too
many database requests.
My model structure is like this:
class ExampleA(models.Model):
...
class ExampleB(models.Model):
aexample = models.ForeignKey('ExampleA', related_name='bexam
On 12/23/14 19:13, 'Petros Moisiadis' via Django users wrote:
> Hello people :)
>
> I am struggling with optimizing an admin with inlines which causes too
> many database requests.
>
> My model structure is like this:
>
> class ExampleA(models.Model):
> ...
>
> class ExampleB(mo
On 12/24/14 13:30, 'Petros Moisiadis' via Django users wrote:
> On 12/23/14 19:13, 'Petros Moisiadis' via Django users wrote:
>> Hello people :)
>>
>> I am struggling with optimizing an admin with inlines which causes too
>> many database requests.
>>
>> My model structure is like this:
>>
>> c
Hi Petros,
I think the raw_id_fields still display the __str__/__unicode__ of the
selected object so therefore need to get queried. I wonder if
select_related would possibly help?
Collin
On Wednesday, December 24, 2014 5:53:02 AM UTC-6, Ernest0x wrote:
>
> On 12/24/14 13:30, 'Petros Moisiadis'
Hello Collin,
On 12/29/14 07:25, Collin Anderson wrote:
> Hi Petros,
>
> I think the raw_id_fields still display the __str__/__unicode__ of the
> selected object so therefore need to get queried. I wonder if
> select_related would possibly help?
>
I do have select_related in the queryset (look at
Hi Petros,
I think it's because "value_from_object" only passes the primary key of the
object and then raw_id_field re-queries it.
https://github.com/django/django/blob/40ccef16/django/contrib/admin/widgets.py#L195
https://github.com/django/django/blob/40ccef16/django/forms/models.py#L151
https:
6 matches
Mail list logo