Currently i work on an application to manage drivers for cars and events written in Django, Python.
I have the two Models:
class Vehicle(models.Model):
name = models.CharField(max_length=100)
max_capacity = models.IntegerField(default=2)
available = models.BooleanField()
class Event(models.Model):
start_timestamp = models.DateTimeField()
end_timestamp = models.DateTimeField()
description = models.TextField()
location = LatLonField()
I've a pool of 10 different vehicles saved.
There are 18 different Events.
Now i want to add multiple Vehicles to an event without to generate new ones for every event, and specify a number of people which will be using this car for this event like:
Event 0815:
- FirstCar, loaded with 5/13 People
- SecondCar, loaded with 2/2 People
(The max capacity of a car is given in it's Model)
How is this with the structure of djangos database concept possible?