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 m

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) > > > On

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 Hoàng

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 Promotions(models

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 said

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: TypeError:

__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: static files not getting served

2021-12-05 Thread Adriano Machado
Hi, Heroku and SQLite do t match. Read this: From: https://devcenter.heroku.com/articles/sqlite3 SQLite runs in memory, and backs up its data store in files on disk. While this strategy works well for development, Heroku’s Cedar stack has an ephemeral filesystem

Re: static files not getting served

2021-12-05 Thread Jet Ezra
To me, you are not going to serve static files but media files, am sure that the image linked above was as a result of uploading it somewhere, However much you try, heroku does not handle media files, when you upload your image, the next refresh of the running dyno will delete it from your file dir

Re: static files not getting served

2021-12-05 Thread Kasper Laudrup
On 05/12/2021 14.18, Rahul wrote: see brother i am not shouting at all . Writing in ALL CAPITAL LETTERS is considered shouting. Please refrain from doing that. I am also not your brother. Using language like that makes it hard to take you serious. i am using heroku for deployment and i did

Re: static files not getting served

2021-12-05 Thread Lakshyaraj Dash X-D 25
Inside settings.py, Write these two lines of code and your static files will be served import os STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') On Sun, Dec 5, 2021, 18:49 Rahul wrote: > see brother i am not shouting at all . i am using heroku for deployment > and i didnt got any big erro

Re: static files not getting served

2021-12-05 Thread Rahul
see brother i am not shouting at all . i am using heroku for deployment and i didnt got any big error just in websites console ''failed to load resource server responded with the status of 404 '' i had deployed by pushing files to github and then using heroku . i had also used whitenoise but it