bulk_update() causes Select N+1 issue

2023-01-13 Thread Nick Chang
Hi all, I read django doc on 'bulk_update() ' It said that generally it creates one single query to do so, but in a project I have has 'a_model.objects.bulk_update(update_list, fields=updated_keys), it actually

Re: ChannelsLiveServerTestCase: not posting messages

2023-01-13 Thread shahil joshi
hi, when I am running the test it takes the main DB for storing the inner operations data why it's not storing to test DB? can you help me with this? On Thursday, January 5, 2023 at 11:42:06 PM UTC+5:30 elm.r...@gmail.com wrote: > I've by now realized this issue is related specifically to

Re: Unit test is written but coverage report says there are missing statements

2023-01-13 Thread shahil joshi
when i am running the test its storing the inner functional data to main db not test db why ? On Monday, January 9, 2023 at 2:32:20 PM UTC+5:30 sencer...@gmail.com wrote: > Hi, > > I try to get coverage reports using a simple django model. > Unit test for model was written but report says there

Re: How to pass "--runworker --asgi" to wsgi.py

2023-01-13 Thread Bala Subramanyam Vemu
Thank you Andréas ! Regards Bala On Friday, January 13, 2023 at 3:58:12 PM UTC+5:30 andrea...@hypercode.se wrote: > The simple answer is - you can't. > > Django can run in 2 separate ways: Synchronous - via a WSGI server - or > asynchronous via an ASGI server. Websocket requests run via ASGI

Re: Serving Media and Static files on Shared Hosting

2023-01-13 Thread Namanya Daniel
Have you done it before? You can share knowledge On Fri, 13 Jan 2023 at 15:25, Jeff Kingsley wrote: > Why > > On Fri, Jan 13, 2023 at 11:56 AM Namanya Daniel > wrote: > >> Hello members, >> >> Has anyone ever used Namecheap shared hosting to serve static and media >> files? Apparently nginx

Re: Serving Media and Static files on Shared Hosting

2023-01-13 Thread Jeff Kingsley
Why On Fri, Jan 13, 2023 at 11:56 AM Namanya Daniel wrote: > Hello members, > > Has anyone ever used Namecheap shared hosting to serve static and media > files? Apparently nginx can't be used, i only have WhiteNoise which serves > static files only. > > kindly share you've done it before..

Re: How to pass "--runworker --asgi" to wsgi.py

2023-01-13 Thread Andréas Kühne
The simple answer is - you can't. Django can run in 2 separate ways: Synchronous - via a WSGI server - or asynchronous via an ASGI server. Websocket requests run via ASGI - so you need an ASGI server. You can read the official documentation and see your alternatives here:

Serving Media and Static files on Shared Hosting

2023-01-13 Thread Namanya Daniel
Hello members, Has anyone ever used Namecheap shared hosting to serve static and media files? Apparently nginx can't be used, i only have WhiteNoise which serves static files only. kindly share you've done it before.. thanks in advance -- You received this message because you are