Removed name from Shuttles. Based just on bus and school

Formatting cleanups
This commit is contained in:
John Mullins
2023-08-25 10:28:44 +10:00
parent c07fd817a8
commit 4e15e98801
+3 -3
View File
@@ -11,6 +11,7 @@ class Setting(models.Model):
def __str__(self):
return self.name
class Suburb(models.Model):
STATE = [
("VIC", "Victoria"),
@@ -86,14 +87,13 @@ class Bus(models.Model):
class Shuttle(models.Model):
bus = models.ForeignKey(Bus, on_delete=models.CASCADE)
name = models.CharField(max_length=20)
school = models.ForeignKey(School, on_delete=models.CASCADE)
class Meta:
ordering = ["school__name"]
def __str__(self):
return f"{self.name}, {self.bus.route_name} -> {self.school.name}"
return f"{self.bus.route_name} -> {self.school.shortName}"
class Driver(models.Model):
@@ -236,7 +236,7 @@ class Traveller(models.Model):
stops += stop.active_stops()
if stops > 1:
stops = 1
return f"${str(cost*stops)}"
return f"${str(cost * stops)}"
class TravellerRoute(models.Model):