Skip to content

Commit

Permalink
#23 feat : modify products (#28)
Browse files Browse the repository at this point in the history
* #23 feat : modify products

* Delete UpcyProject/settings.py
  • Loading branch information
chaechaeis authored Mar 23, 2024
1 parent 7a38b94 commit c2bd3c0
Show file tree
Hide file tree
Showing 8 changed files with 335 additions and 212 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,5 @@ media
.Dockerfile.swp
products/photo/
users/profile/
.idea
.idea
services/photo/
171 changes: 0 additions & 171 deletions UpcyProject/settings.py

This file was deleted.

25 changes: 25 additions & 0 deletions services/migrations/0004_service_created_service_updated.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.11 on 2024-03-20 11:36

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

dependencies = [
('services', '0003_service_max_price'),
]

operations = [
migrations.AddField(
model_name='service',
name='created',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='service',
name='updated',
field=models.DateTimeField(auto_now=True),
),
]
3 changes: 2 additions & 1 deletion services/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.db import models
from core.models import TimeStampedModel

# Create your models here.
class Category(models.Model):
Expand All @@ -16,7 +17,7 @@ class Fit(models.Model):
class Detail(models.Model):
name = models.CharField(max_length=100,blank=False)

class Service(models.Model):
class Service(TimeStampedModel):
name = models.CharField(max_length=100)
#필터링 항목
category = models.ForeignKey('Category', related_name='services',on_delete=models.CASCADE, null=True, blank=True)
Expand Down
Loading

0 comments on commit c2bd3c0

Please sign in to comment.