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

2021-12-06 Thread Khánh Hoàng
Yes, I found it. Thank you for replying. Vào lúc 11:43:22 UTC+7 ngày Thứ Hai, 6 tháng 12, 2021, aashishk...@gmail.com đã viết: > ManyToManyField doesn’t need on_delete attribute > > Remove on_delete attribute > > On Mon, 6 Dec 2021 at 9:05 AM, Thomas Lockhart > wrote: > >> Please use polite

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

2021-12-05 Thread Aashish Kumar
ManyToManyField doesn’t need on_delete attribute Remove on_delete attribute On Mon, 6 Dec 2021 at 9:05 AM, Thomas Lockhart wrote: > Please use polite language. Thank you. > > - Tom > > On Dec 5, 2021, at 5:21 PM, Anurag Agarwal > wrote: > > Why are you fucking passing the args > On_delete in

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

2021-12-05 Thread Thomas Lockhart
Please use polite language. Thank you. - Tom > On Dec 5, 2021, at 5:21 PM, Anurag Agarwal wrote: > > Why are you fucking passing the args > On_delete in manytomany . Class > >promotion = models.ManyToManyField(Promotions, on_delete=models.CASCADE) > > > On Sun, Dec 5, 2021, 21:09 Samuel

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

2021-12-05 Thread Khánh Hoàng
Oh, Thank you very much, I realized my mistake. Vào lúc 08:23:47 UTC+7 ngày Thứ Hai, 6 tháng 12, 2021, anurag@gmail.com đã viết: > Why are you fucking passing the args > On_delete in manytomany . Class > > promotion = models.ManyToManyField(Promotions, on_delete=models.CASCADE) > > >

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

2021-12-05 Thread Anurag Agarwal
Why are you fucking passing the args On_delete in manytomany . Class promotion = models.ManyToManyField(Promotions, 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

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

2021-12-05 Thread Khánh Hoàng
from ctypes import DEFAULT_MODE from django.db import models from django.db.models.deletion import CASCADE, PROTECT from django.db.models.expressions import Col from django.db.models.fields import PositiveSmallIntegerField from django.utils.translation import pgettext_lazy class

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

2021-12-05 Thread Samuel Nogueira
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 months, I had an issue > when making migrations for my apps. > > I run :" python manage.py makemigrations " and I got a error. > It

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

2021-12-05 Thread Uzzal Hossain
Change on delete to on_delete in your model On Sun, Dec 5, 2021, 9:34 PM Khánh Hoàng wrote: > 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:

__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