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