Re: Defining a custom email backend

2021-09-23 Thread Sujata Aghor
Got my answer here - https://stackoverflow.com/questions/43857594/django-set-e-mail-settings-in-view/43881974#43881974 Setting up values for connection object from database for specific reseller. Thanks On Thu, Sep 23, 2021 at 11:09 AM Sujata Aghor wrote: > *settings.py : * > DEFAULT_FROM_EMAIL

Re: How to check if lock is acquired in Django pglock

2021-09-23 Thread Kasper Laudrup
On 23/09/2021 17.12, Sencer Hamarat wrote: Thanks for reply, Afterwards, I figured out it was like in your comment. Good to hear and thanks for sharing the solution. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" gr

How can add multiple forms according to input enter number or with click add more button

2021-09-23 Thread Muhammad Abu Baker
I have an input field where the will customer add a number for buy membership then will get forms according to numbers 1,2, or 5 then will show 1,2, or 5 forms with input fields in which will add data. How can add this type of functionality? Because I'm a beginner in python Django. Thanks Fo

Re: How to check if lock is acquired in Django pglock

2021-09-23 Thread Sencer Hamarat
Thanks for reply, Afterwards, I figured out it was like in your comment. Solution: lock_id = "non_unique_lock" with advisory_lock(lock_id, wait=False) as acquired: if acquired: # things to do else: raise Exception() # or whatever you want. Regards, Sencer HAMARAT On

Re: Question regarding organizing models

2021-09-23 Thread bnmng
Are you saying a user can only have one company? If a user can have more than one company then just define the foreign key in company. Then there will automatically be query set attached to each user called company_set. Otherwise, you can define a OneToOneField in User. You can create a thir

Re: Cannot start Daphne / Looking for channels production deployment with daphne/nginx

2021-09-23 Thread Javier Menéndez Rizo
You are missing a main attribute on your asgi.py file. Try with daphne -b 0.0.0.0 -p 8001 mabtest.asgi:application El miércoles, 22 de septiembre de 2021 a las 20:37:50 UTC, mab.mo...@gmail.com escribió: > Hello, > > I am attempting to add asgi/channels to an existing django project/web > app