Trying to send mails from website

2020-05-01 Thread Divash Singh
Hi guys,  I am using Celery and Eventlet to facilitate a task which sends emails.  I am using the following code: @task def order_created(order_id):    """    Task to send an e-mail notification when an order is    successfully created.    """    order = Order.objects.get(id=order_id)    subject =

Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Divash Singh
You can try something like “no value” Sent from my iPhone > On 26 Apr 2020, at 18:42, Divash Singh wrote: > >  > Once you use the default argument for a model field, it cannot be removed > even when u rerun migrations. > > You need to provide a valid default input va

RE: Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Divash Singh
Once you use the default argument for a model field, it cannot be removed even when u rerun migrations. You need to provide a valid default input value for each specific field Sent from Mail for Windows 10 From: Mayur BagulSent: Sunday, 26 April 2020 18:39To: Django usersSubject: Re: The database b

RE: Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Divash Singh
Also, Please make sure that any foreign key fields are not default nulls Sent from Mail for Windows 10 From: Mayur BagulSent: Sunday, 26 April 2020 18:39To: Django usersSubject: Re: The database backend does not accept 0 as a value for AutoField. Hey thanks for your response i did so because initia

RE: Post user input to django python shell??

2020-04-26 Thread Divash Singh
Hi, Did you solve your issue yet? Sent from Mail for Windows 10 From: Michael Karikari Sent: Sunday, 26 April 2020 16:05 To: Django users Subject: Post user input to django python shell?? Looking for some clarity to issue I'm having. I have external python API I'm hitting via a view, but it re

RE: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Divash Singh
Think you shouldn’t use false as a default for fields which are not bool Sent from Mail for Windows 10 From: Antje Kazimiers Sent: Sunday, 26 April 2020 17:40 To: django-users@googlegroups.com Subject: Re: The database backend does not accept 0 as a value for AutoField. setting default=False is