semester.models module¶
- class semester.models.Semester(*args, **kwargs)[源代码]¶
基类:
Model
学期
不同的学期时间不应重叠
- year¶
学年的起始年份,如2019-2020学年为2019
- Type:
int
- type¶
学期类型
- Type:
- start_date¶
开学日期
- Type:
date
- end_date¶
放假日期
- Type:
date
- exception DoesNotExist¶
基类:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
基类:
MultipleObjectsReturned
- end_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_end_date(*, field=<django.db.models.fields.DateField: end_date>, is_next=True, **kwargs)¶
- get_next_by_start_date(*, field=<django.db.models.fields.DateField: start_date>, is_next=True, **kwargs)¶
- get_previous_by_end_date(*, field=<django.db.models.fields.DateField: end_date>, is_next=False, **kwargs)¶
- get_previous_by_start_date(*, field=<django.db.models.fields.DateField: start_date>, 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>¶
- start_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- type¶
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.
- type_id¶
- year¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class semester.models.SemesterType(id, name)[源代码]¶
基类:
Model
- exception DoesNotExist¶
基类:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
基类:
MultipleObjectsReturned
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
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>¶
- semester_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.