Tutorial 5 Add Records via ipython

This commit is contained in:
Cutty 2026-03-14 15:56:52 -06:00
parent 191b9d605f
commit df324bfa63

View file

@ -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}"