From df324bfa63290f242957cdf06d9738088efc8780 Mon Sep 17 00:00:00 2001 From: Cutty Date: Sat, 14 Mar 2026 15:56:52 -0600 Subject: [PATCH] Tutorial 5 Add Records via ipython --- touragency/agency/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/touragency/agency/models.py b/touragency/agency/models.py index 1604a0f..d61759a 100644 --- a/touragency/agency/models.py +++ b/touragency/agency/models.py @@ -7,3 +7,7 @@ class Tour(models.Model): destination_country = models.CharField(max_length=64) nights = models.IntegerField() price = models.IntegerField() + + # This is a string representation of the tour + def __str__(self): + return f"ID:{self.id}: From {self.origin_country} To {self.destination_country}, {self.nights} nights cost ${self.price}"