Re: simple command line ./manage.py shell puzzle

2022-04-24 Thread Derek
Actually, there does seem to be some further issue: echo "import datetime; [datetime.date(2022,4,e) for e in [1,2]]" > test.py Also triggers an error when used in the Django shell, but works when run as a normal Python script: python test.py On Monday, 25 April 2022 at 07:44:02 UTC+2 Derek

Re: simple command line ./manage.py shell puzzle

2022-04-24 Thread Derek
It fails because the second datetime in your test script is taken to be a variable and it is not one you have already defined; hence the error: "NameError: name 'datetime' is not defined". Try this instead: echo "import datetime ; [e*e for e in [1,2]]" > test On Thursday, 21 April 2022 at

Re: Connection timeout error with Postgres

2022-04-24 Thread Antonis Christofides
Since PostgreSQL is listening on a different machine, then it is more or less clear from the error message that the traffic is being filtered. It's strange it works sometimes and other times it isn't working. Does it have a static IP address? Is the PostgreSQL server machine running something

Re: Connection timeout error with Postgres

2022-04-24 Thread Disha Patel
Hi Antonis, Yes, the PostgreSQL server is on a difference machine than Django. I have noticed that initial connections are successful but it fails in the later connections mainly in long running jobs. Thanks, Disha On Friday, April 22, 2022 at 12:19:27 PM UTC+5:30 Antonis Christofides

Re: SMTPConnectError

2022-04-24 Thread Antonis Christofides
Indeed, I don't know how it is nowadays, but a few years ago Gmail did not allow (or did not support) using it as a smarthost if all you had was a free account. This means that even if you get it to work it will stop working the next day or month. On 24/04/2022 16.15, Jason wrote: how many

Re: SMTPConnectError

2022-04-24 Thread Jason
how many emails are you sending out like this? this really isn't a django or python issue, its a gmail/google concern and is tied to using this pretty heavily over other services (mailgun, sendgrid, etc) On Saturday, April 23, 2022 at 7:26:09 PM UTC-4 otuwi...@gmail.com wrote: > Hello guys, >