Commit 1ad8caf4 authored by justin's avatar justin

Fixed formatting and changed venue to TextField

parent b12b5ef9
......@@ -4,19 +4,22 @@ from assignments.models import Course
# Create your models here.
class Location(models.Model):
LOCATION_CHOICES = [
('ONSITE', 'Onsite'),
('ONLINE', 'Online'),
('HYBRID', 'Hybrid'),
("ONSITE", "Onsite"),
("ONLINE", "Online"),
("HYBRID", "Hybrid"),
]
mode = models.CharField(max_length=6, choices=LOCATION_CHOICES, default='ONSITE')
venue = models.CharField(max_length=50)
mode = models.CharField(max_length=6, choices=LOCATION_CHOICES, default="ONSITE")
venue = models.TextField(max_length=255)
def __str__(self):
return self.venue
class Event(models.Model):
target_datetime = models.DateTimeField("Target Date and Time",)
target_datetime = models.DateTimeField(
"Target Date and Time",
)
activity = models.CharField(max_length=50)
estimated_hours = models.FloatField()
location = models.ForeignKey(Location, on_delete=models.CASCADE)
......@@ -24,4 +27,3 @@ class Event(models.Model):
def __str__(self):
return self.activity
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