__init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Khánh Hoàng
Hi everyone, I am new to programming, more than 4 months, I had an issue when making migrations for my apps. I run :" python manage.py makemigrations " and I got a error. It said: TypeError: __init__() got an unexpected keyword argument 'on delete' I'm Using Django 3.2.9 Can someone explai

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Khánh Hoàng
gits=6, decimal_places=2) class CartItem(models.Model): cart = models.ForeignKey(Cart, on_delete=models.CASCADE) product = models.ForeignKey(Product, on_delete=models.CASCADE) quantity = models.PositiveSmallIntegerField() here is my models.py. Vào lúc 22:39:21 UTC+7 ngày Chủ Nhật

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Khánh Hoàng
dels.CASCADE) > > > On Sun, Dec 5, 2021, 21:09 Samuel Nogueira wrote: > >> Please, can you take some prints of your models? >> >> Em dom., 5 de dez. de 2021 12:34, Khánh Hoàng >> escreveu: >> >>> Hi everyone, I am new to programming, more than 4

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-06 Thread Khánh Hoàng
motions, >> on_delete=models.CASCADE) >> >> >> On Sun, Dec 5, 2021, 21:09 Samuel Nogueira wrote: >> >>> Please, can you take some prints of your models? >>> >>> Em dom., 5 de dez. de 2021 12:34, Khánh Hoàng >>> escreveu: >

How to change Mysql server port for using two instances of mysql when running Django code

2022-01-14 Thread Khánh Hoàng
Hi everyone, I'm new to Django, I'm trying to run Python code using Django framework, I'm on Windows and want to try Redis, because Redis doesn't support Windows machines so I want to run it with WSL I want to change mysql server port in 2 different instances of Mysql, one for WSL and one for

Re: How to change Mysql server port for using two instances of mysql when running Django code

2022-01-15 Thread Khánh Hoàng
Thank you!! Vào lúc 00:20:44 UTC+7 ngày Thứ Bảy, 15 tháng 1, 2022, Kasper Laudrup đã viết: > On 14/01/2022 09.18, Khánh Hoàng wrote: > > I want to change mysql server port in 2 different instances of Mysql, > > one for WSL and one for Windows. How can I do it? > > >