Re: FOREIGN KEY constraint failed

2018-04-07 Thread Christophe Pettus
> On Apr 7, 2018, at 12:27, DIlIMBEK TURANOV wrote: > File "/home/den/HTML_Projects/HTML5/test_project/orders/views.py" in checkout > 59. order = Order.objects.create(user=user, customer_name=name, > customer_phone=phone, status_id=1) You're most likely creating an Order object th

FOREIGN KEY constraint failed

2018-04-07 Thread DIlIMBEK TURANOV
sMiddleware']Traceback:File "/home/den/HTML_Projects/HTML5/test_project/venv/lib/python3.5/site-packages/django/db/backends/base/base.py" in _commit 239. return self.connection.commit()The above exception (FOREIGN KEY constraint failed) was the direct cause of the foll

Re: IntegrityError: FOREIGN KEY constraint failed: Django 2.0.3

2018-03-22 Thread Seven Reeds
Uh, am I not using the ORM? If I am not then what must I do to get back on track? I just realized that i didn't include the "Delete" CBV in my original post. I do not have easy access to the code at the moment so what follows is a rough approximation of what that code is about and is prolly f

Re: IntegrityError: FOREIGN KEY constraint failed: Django 2.0.3

2018-03-21 Thread Simon Charette
Hello Anon, Django doesn't use database level ON DELETE constraints and emulates them in Python to dispatch pre_delete/post_delete signals. As long as you're using the ORM to perform the deletion you shouldn't encounter constraint violations. There's a ticket to add support for database level o

IntegrityError: FOREIGN KEY constraint failed: Django 2.0.3

2018-03-21 Thread Anon Ymous
Hi, I am learning python by trying to create a small Django app. I may have found a bug related to Django and/or sqlite3. If you are stackoverflow folks then my initial post is there: https://stackoverflow.com/questions/49361834/integrityerror-exception-in-deleteview-cbv My app really is ju