I want to build Trip.Model, with multiple Hotel.Model assignments, each under a different field name. Example(_pb, _hv, _nl)
class Trip(models.Model):
hotel_pb = models.ForeignKey(Hotel, on_delete=models.PROTECT, blank=True)
hotel_hv = models.ForeignKey(Hotel, on_delete=models.PROTECT, blank=True)
hotel_nl = models.ForeignKey(Hotel, on_delete=models.PROTECT, blank=True)
How do I achieve this without creating multiple Hotel.Model ?
I have tried using the same Foreignkey, but throws error.
Reverse accessor 'Activity.trip_set' for 'gobasic.Trip.acitivity_3' clashes with reverse accessor for 'gobasic.Trip.acitivity_1'. HINT: Add or change a related_name argument to the definition for 'gobasic.Trip.acitivity_3' or 'gobasic.Trip.acitivity_1'