diff --git a/UpcyProject/settings.py b/UpcyProject/settings.py index 4c4cdda..abae5fe 100644 --- a/UpcyProject/settings.py +++ b/UpcyProject/settings.py @@ -18,7 +18,6 @@ # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent env = environ.Env(DEBUG=(bool, False)) - # env_file = os.path.join(BASE_DIR, '.env') # if os.path.exists(env_file): # environ.Env.read_env( diff --git a/products/migrations/0007_category_fit_style_texture_product_category_and_more.py b/products/migrations/0007_category_fit_style_texture_product_category_and_more.py index 63cdeff..d74490e 100644 --- a/products/migrations/0007_category_fit_style_texture_product_category_and_more.py +++ b/products/migrations/0007_category_fit_style_texture_product_category_and_more.py @@ -42,7 +42,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='product', name='category', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='products', to='products.category'), + field=models.ForeignKey(blank=False, null=False, on_delete=django.db.models.deletion.CASCADE, related_name='products', to='products.category'), preserve_default=False, ), migrations.AddField( diff --git a/products/migrations/0008_alter_product_category.py b/products/migrations/0008_alter_product_category.py index e54e9d3..7a1ee01 100644 --- a/products/migrations/0008_alter_product_category.py +++ b/products/migrations/0008_alter_product_category.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='product', name='category', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='products', to='products.category'), - ), + field=models.ForeignKey(blank=False, null=False, on_delete=django.db.models.deletion.CASCADE, related_name='products', to='products.category'), + ), # 여기 수정해야할 수도 있음 ]