Commit f0cf7ba6 authored by nheoxoz's avatar nheoxoz

updated models

parent 8e18438a
# Generated by Django 4.1.7 on 2023-03-06 03:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('widget_calendar', '0005_alter_event_course_alter_location_mode'),
]
operations = [
migrations.AlterField(
model_name='event',
name='course',
field=models.CharField(max_length=100),
),
]
......@@ -24,7 +24,11 @@ class Event(models.Model):
activity = models.CharField(max_length=255)
estimated_hours = models.FloatField()
location = models.ForeignKey(Location, on_delete=models.CASCADE)
course = models.CharField(max_length=100)
course = course = models.ForeignKey(
'assignments.Course',
on_delete=models.CASCADE,
related_name="event_course"
)
def __str__(self):
return '{}, {}'.format(self.activity, self.target_datetime)
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