Made migrations for newly populated models.py and implemented admin.py;...

Made migrations for newly populated models.py and implemented admin.py; migrated models and tested runserver to check for errors
parent ed8913e2
# Generated by Django 4.1.6 on 2023-03-04 15:07
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Location',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('mode', models.CharField(choices=[('onsite', 'onsite'), ('online', 'online'), ('hybrid', 'hybrid')], default='onsite', max_length=6)),
('venue', models.TextField()),
],
),
migrations.CreateModel(
name='Event',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('target_datetime', models.DateTimeField()),
('activity', models.TextField(max_length=300)),
('estimated_hours', models.FloatField()),
('course', models.CharField(max_length=150)),
('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='widget_calendar.location')),
],
),
]
......@@ -7,6 +7,7 @@ class Location(models.Model):
('hybrid', 'hybrid')
]
mode = models.CharField(
max_length=6,
choices=modechoices,
default='onsite'
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment