diff --git a/main/management/commands/seed_db.py b/main/management/commands/seed_db.py index 724e152..8a7fec3 100644 --- a/main/management/commands/seed_db.py +++ b/main/management/commands/seed_db.py @@ -27,15 +27,15 @@ def handle(self, *args, **kwargs): event.save() - # Create ticket price - for price in row['ticket']: - if price is not None: - price = TicketPrice.objects.create( - name=price['name'], - price=price['price'], - event=event - ) - price.save() + # # Create ticket price + # for price in row['ticket']: + # if price is not None: + # price = TicketPrice.objects.create( + # name=price['name'], + # price=price['price'], + # event=event + # ) + # price.save() # except Exception as e: # print('Error in row' + str(row)) # pass diff --git a/main/migrations/0003_alter_event_location.py b/main/migrations/0003_alter_event_location.py new file mode 100644 index 0000000..9dd72c1 --- /dev/null +++ b/main/migrations/0003_alter_event_location.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.1 on 2024-10-09 08:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0002_alter_event_uuid'), + ] + + operations = [ + migrations.AlterField( + model_name='event', + name='location', + field=models.CharField(max_length=200, null=True), + ), + ] diff --git a/main/models.py b/main/models.py index c4ea08c..6018101 100644 --- a/main/models.py +++ b/main/models.py @@ -52,7 +52,7 @@ class Event(models.Model): start_time = models.DateTimeField() end_time = models.DateTimeField(null=True, blank=True) - location = models.CharField(max_length=200) + location = models.CharField(max_length=200, null=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)