Skip to content

Commit

Permalink
#31 fix : modify migrations and image upload (#32)
Browse files Browse the repository at this point in the history
* #23 feat : modify products

* #31 fix : additional modify migration
  • Loading branch information
chaechaeis authored Apr 6, 2024
1 parent 32af7d9 commit 97410a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion UpcyProject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions products/migrations/0008_alter_product_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
), # 여기 수정해야할 수도 있음
]

0 comments on commit 97410a3

Please sign in to comment.