dormitory.models module

class dormitory.models.Agreement(id, user, sign_time)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

get_next_by_sign_time(*, field=<django.db.models.fields.DateTimeField: sign_time>, is_next=True, **kwargs)
get_previous_by_sign_time(*, field=<django.db.models.fields.DateTimeField: sign_time>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
sign_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

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 a ForwardManyToOneDescriptor instance.

user_id
class dormitory.models.Dormitory(id, capacity, gender)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

class Gender(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]

基类:TextChoices

FEMALE = 'F'
MALE = 'M'
exception MultipleObjectsReturned

基类:MultipleObjectsReturned

capacity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

dormitoryassignment_set

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.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

gender

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_gender_display(*, field=<django.db.models.fields.CharField: gender>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class dormitory.models.DormitoryAssignment(id, dormitory, user, bed_id, time)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

bed_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

dormitory

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 a ForwardManyToOneDescriptor instance.

dormitory_id
get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)
get_previous_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

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 a ForwardManyToOneDescriptor instance.

user_id