In signal i have been trying to doing this . i'm new at Django.
help me with this:
class Examiner(models.Model):
#just think i have saved (Primary School Certificate) in to my database.
examiner_title = models.CharField(max_length=150)
slug = models.SlugField(max_length=100, unique=True,blank
I am developing a django application, most of the views are tables, I am
facing a problem the loading time of my page is extremely long. how can I
do to optimize this, my data set represents more than 100,000 rows. thank
you for your help ^^
--
You received this message because you are subsc
Use pagination and select_related , prefetch_related.
Also consider using caching
Default django pagination will load all rows then paginate them , which
will consume time and hits on database.
Search for a custom pagination solution that loads 10 rows by 10 rows as an
example
On Wed, 10 Feb 2
Hi, read about this topics
https://docs.djangoproject.com/en/3.1/ref/models/querysets/#select-related
#for FK relations
https://docs.djangoproject.com/en/3.1/ref/models/querysets/#prefetch-related-objects
# for M2M relations
and read about pagination
https://docs.djangoproject.com/en/3.1/topics/p
Hi, I am using the django_import_export package but i am not been able to
import files, the tables are related. Please find the attached
files(models, resources and admin) for your reference.
Please help me
--
You received this message because you are subscribed to the Google Groups
"Django use
Dear Sir/Mam,
I Am A First Year MCA LJ Collage Ahmedabad
I Am Actively Looking For Some Good GSoc Organisations To Contribute
I Actively Contribute To Open Source Project
I Am Interested In Web Development And Have Worked With Django ,php,js.
I See Your GSoc Projects And I Am Starting To Con
ok thanks
Le mer. 10 févr. 2021 à 01:42, Rama akki a écrit :
> Better, you can use signal or model manager with one-to-one relationship
>
> On Sat, 6 Feb 2021, 7:13 pm degnon...@gmail.com,
> wrote:
>
>> hi, say I have this model
>>
>> class Event(models.Model):
>> ...
>> metrics = models.On
It's a known problem. See https://code.djangoproject.com/ticket/24622. In
short, the django template code has hooks to populate these values in the
test client's response. The jinja folks (understandably) don't want to add
the same hooks.
On Friday, February 5, 2021 at 1:37:10 AM UTC-5 Benny
I've gotten back to playing with this. What I've ended up doing is
monkey-patching render to send the signal django.test.Client is expecting
from the template backend. Paraphrasing my (python 3.7) code:
from unittest.mock import patch
from django.test.signals import template_rendered
from djan
Hmmm, it's not doing the templates quite right. assertTemplateUsed()
doesn't work, but I can get around that easy enough:
-self.assertTemplateUsed(response, 'spi/sock-info.dtl')
+
+self.assertEqual(response.templates, ['spi/sock-info.jinja'])
On Wednesday, February 10, 2021 at 9
10 matches
Mail list logo