rpaper.apps.reservations package¶
Subpackages¶
Submodules¶
rpaper.apps.reservations.admin module¶
rpaper.apps.reservations.apps module¶
rpaper.apps.reservations.middleware module¶
rpaper.apps.reservations.models module¶
-
class
rpaper.apps.reservations.models.Record(hashid, name, contact, remarks, thing, owner, start_at, end_at, credential, ipaddress, created_at, updated_at)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Record.MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Record.TIMESPAN_MAX_HOURS= 24¶
-
Record.TIMESPAN_THRESHOLD= datetime.timedelta(1)¶
-
Record.contact¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.created_at¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.credential¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.end_at¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.get_next_by_created_at(*moreargs, **morekwargs)¶
-
Record.get_next_by_end_at(*moreargs, **morekwargs)¶
-
Record.get_next_by_start_at(*moreargs, **morekwargs)¶
-
Record.get_next_by_updated_at(*moreargs, **morekwargs)¶
-
Record.get_previous_by_created_at(*moreargs, **morekwargs)¶
-
Record.get_previous_by_end_at(*moreargs, **morekwargs)¶
-
Record.get_previous_by_start_at(*moreargs, **morekwargs)¶
-
Record.get_previous_by_updated_at(*moreargs, **morekwargs)¶
-
Record.hashid¶
-
Record.ipaddress¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.objects= <rpaper.apps.reservations.models.RecordManager object>¶
-
Record.owner¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parentis aForwardManyToOneDescriptorinstance.
-
Record.owner_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.remarks¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.save(force_insert=False, force_update=False, using=None, update_fields=None)¶ Saves the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
-
Record.start_at¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.thing¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parentis aForwardManyToOneDescriptorinstance.
-
Record.thing_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Record.updated_at¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
rpaper.apps.reservations.models.RecordManager[source]¶ Bases:
django.db.models.manager.ManagerA management class of Record model
-
class
rpaper.apps.reservations.models.Thing(hashid, name, remarks, thumbnail, owner, ipaddress, created_at, updated_at)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Thing.MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Thing.created_at¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Thing.get_next_by_created_at(*moreargs, **morekwargs)¶
-
Thing.get_next_by_updated_at(*moreargs, **morekwargs)¶
-
Thing.get_previous_by_created_at(*moreargs, **morekwargs)¶
-
Thing.get_previous_by_updated_at(*moreargs, **morekwargs)¶
-
Thing.hashid¶
-
Thing.ipaddress¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Thing.name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Thing.objects= <django.db.models.manager.Manager object>¶
-
Thing.owner¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parentis aForwardManyToOneDescriptorinstance.
-
Thing.owner_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Thing.records¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
Thing.remarks¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Thing.thumbnail¶ Enhanced ImageFileDescriptor
Just like the ImageFileDescriptor, but for ThumbnailField. The only difference is removing previous Image and Thumbnails from storage when the value has changed.
-
Thing.updated_at¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception