CarApplication¶
Qualified name: intranet.apps.parking.models.CarApplication
- class intranet.apps.parking.models.CarApplication(id, user, license_plate, make, model, year, added, updated)[source]¶
Bases:
Model
- Parameters:
id (AutoField) – Primary key: ID
license_plate (CharField) – License plate
make (CharField) – Make
model (CharField) – Model
year (PositiveIntegerField) – Year
added (DateTimeField) – Added
updated (DateTimeField) – Updated
Relationship fields:
- Parameters:
user (
ForeignKey
toUser
) – User (related name:carapplication
)
Reverse relationships:
- Parameters:
parkingapplication (Reverse
ManyToManyField
fromParkingApplication
) – All parking applications of this car application (related name ofcars
)
Methods
get_next_by_added
Finds next instance based on
added
.get_next_by_updated
Finds next instance based on
updated
.get_previous_by_added
Finds previous instance based on
added
.get_previous_by_updated
Finds previous instance based on
updated
.Attributes
added
Type:
DateTimeField
id
Type:
AutoField
license_plate
Type:
CharField
make
Type:
CharField
model
Type:
CharField
objects
parkingapplication_set
Type: Reverse
ManyToManyField
fromParkingApplication
updated
Type:
DateTimeField
user
Type:
ForeignKey
toUser
user_id
Internal field, use
user
instead.year
Type:
PositiveIntegerField