loefsys.reservations.models.boat module
Module defining the model for a boat that can be reserved.
- class loefsys.reservations.models.boat.Boat(*args, **kwargs)
Bases:
ReservableItem
Describes a boat that can be reserved.
A boat is part of our or any external fleet of boats. It can be any type of boat. A boat requires a certain skipper’s certificate. It has a limited capacity and can possibly have an engine.
- fleet
The provider of the boat.
- Type:
- requires_skippership
The skippership needed to reserve the boat. Can be none.
- Type:
- capacity
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- has_engine
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- fleet
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- requires_skippership
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- exception DoesNotExist
Bases:
DoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- get_fleet_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: fleet>)
- requires_skippership_id
- reservableitem_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- reservableitem_ptr_id