Removing "Invalid HTTP_HOST header" msgs with nginx.conf default server NOT working

2022-06-24 Thread cseb...@gmail.com
I constantly get the errors below in my Django server logs. To try to remove this, I added this to my Nginx server's nginx.conf file but it didn't work server { listen 80 default_server; return 444; } What else can I do to remove these err

N+1 queries in SerializerMethodField

2022-06-24 Thread m0nte cr1st0
I have this `view` ``` def get_queryset(self) -> QuerySet[Good]: qs = ( Good.objects.values('brand_id', 'brand__name') .annotate( ) .prefetch_related(Prefetch('history', StocksHistory.objects.filter(Q(**

How to generate a table in pdf?

2022-06-24 Thread Kevin Kamla
*Hi family, I created a salary calculation application.As I already display the list of employees, I now have to download it using a function in the VIEW folder.Please I urgently need helpThanks ...* -- You received this message because you are subscribed to the Google Groups "Django users

Re: new record is created while updating

2022-06-24 Thread Ayush Bajpai
raise self.model.DoesNotExist( apps.courseApp.models.Batch.DoesNotExist: Batch matching query does not exist. actually this is the error it is giving but i do have a batch_id.., when i prefill the data of particular batch_id in edit form it gets displayed corretly there. but here it gives t