app.models module

models.py

  • 用户模型

  • 应用内模型
    • 字段

    • 方法

    • 模型常量

    • 模型性质

  • 模型管理器

修改要求 - 模型

  • 如需导出, 在__all__定义

  • 外键和管理器必须进行类型注释`: Class`

  • 与User有一对一关系的实体类型, 需要定义get_type, get_user和get_display_name方法
    • get_type返回UTYPE常量,且可以作为类方法使用

    • 其它建议的方法
      • get_absolute_url: 返回呈现该对象的url,用于后台跳转等,默认是绝对地址

      • get_user_ava: 返回头像的url路径,名称仅暂定,可选支持作为类方法

    • 此外,还应在ClassifiedUser和constants.py中注册

  • 处于平等地位但内部实现不同的模型, 应定义同名接口方法用于导出同类信息

  • 仅供前端使用的方法,在注释中说明

  • 能被评论的模型, 应继承自CommentBase, 并参考其文档字符串要求

  • 性质
    • 模型更改应通过显式数据库操作,性质应是数据库之外的内容(或只读性质)

    • 通过方法或类方法定义,或使用只读的property,建议使用前者,更加直观

    • 若单一对象有确定的定时任务相对应,应添加related_job_ids

...

  • 模型管理器
    • 不应导出

    • 若与学期有关,必须至少支持select_current的三类筛选

    • 与User有一对一关系的实体管理器, 需要定义get_by_user方法
      • get_by_user通过关联的User获取实例,至少支持update和activate

    ...

@Date 2022-03-11

class app.models.AcademicEntry(*args, **kwargs)[源代码]

基类:Model

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

基类:IntegerChoices

OUTDATE = 3
PRIVATE = 0
PUBLIC = 2
WAIT_AUDIT = 1
class Meta[源代码]

基类:object

abstract = False
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
objects: AcademicEntryManager
person

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.

person_id
status

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

class app.models.AcademicQA(id, chat, keywords, directed, rating)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

chat

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

chat_id
directed

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

id

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

keywords

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

objects: AcademicQAManager = <app.models.AcademicQAManager object>
rating

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

class app.models.AcademicQAAwards(id, user, created_undirected_qa)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

created_undirected_qa

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

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>
user

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

user_id
class app.models.AcademicTag(id, atype, tag_content)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

DOUBLE_DEGREE = 2
MAJOR = 0
MINOR = 1
PROJECT = 3
academictagentry_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.

atype

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

get_atype_display(*, field=<django.db.models.fields.SmallIntegerField: atype>)
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>
tag_content

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

class app.models.AcademicTagEntry(id, person, status, tag)[源代码]

基类:AcademicEntry

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

property content: str
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
id

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

person

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.

person_id
status

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

tag

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.

tag_id
class app.models.AcademicTextEntry(id, person, status, atype, content)[源代码]

基类:AcademicEntry

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

CHALLENGE_CUP = 1
GRADUATION = 4
INTERNSHIP = 2
SCIENTIFIC_DIRECTION = 3
SCIENTIFIC_RESEARCH = 0
atype

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

content

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

get_atype_display(*, field=<django.db.models.fields.SmallIntegerField: atype>)
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
id

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

person

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.

person_id
status

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

class app.models.Activity(id, typename, time, modify_time, commentbase_ptr, title, organization_id, year, semester, publish_day, publish_time, need_apply, endbefore, apply_end, start, end, location, introduction, QRcode, bidding, need_checkin, visit_times, examine_teacher, recorded, valid, inner, capacity, current_participants, URL, status, category, course_time)[源代码]

基类:CommentBase

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

基类:IntegerChoices

COURSE = 1
NORMAL = 0
exception DoesNotExist

基类:DoesNotExist

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

基类:IntegerChoices

oneday = 1
onehour = 0
oneweek = 3
threeday = 2
class EndBeforeHours[源代码]

基类:object

prepare_times = [1, 24, 72, 168]
exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

instant = 0
oneday = 1
threeday = 3
twoday = 2
QRcode

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

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

基类:TextChoices

ABORT = '已撤销'
APPLYING = '报名中'
CANCELED = '已取消'
END = '已结束'
PROGRESSING = '进行中'
REJECT = '未过审'
REVIEWING = '审核中'
UNPUBLISHED = '待发布'
WAITING = '等待中'
URL

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

activitysummary_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.

apply_end

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

bidding

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

capacity

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

category

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

commentbase_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 a ForwardOneToOneDescriptor instance.

commentbase_ptr_id
course_time

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.

course_time_id
current_participants

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

end

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

endbefore

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

eval_point() int[源代码]

计算价值的活动积分

examine_teacher

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.

examine_teacher_id
get_category_display(*, field=<django.db.models.fields.SmallIntegerField: category>)
get_endbefore_display(*, field=<django.db.models.fields.SmallIntegerField: endbefore>)
get_next_by_apply_end(*, field=<django.db.models.fields.DateTimeField: apply_end>, is_next=True, **kwargs)
get_next_by_end(*, field=<django.db.models.fields.DateTimeField: end>, is_next=True, **kwargs)
get_next_by_publish_time(*, field=<django.db.models.fields.DateTimeField: publish_time>, is_next=True, **kwargs)
get_next_by_start(*, field=<django.db.models.fields.DateTimeField: start>, is_next=True, **kwargs)
get_previous_by_apply_end(*, field=<django.db.models.fields.DateTimeField: apply_end>, is_next=False, **kwargs)
get_previous_by_end(*, field=<django.db.models.fields.DateTimeField: end>, is_next=False, **kwargs)
get_previous_by_publish_time(*, field=<django.db.models.fields.DateTimeField: publish_time>, is_next=False, **kwargs)
get_previous_by_start(*, field=<django.db.models.fields.DateTimeField: start>, is_next=False, **kwargs)
get_semester_display(*, field=<django.db.models.fields.CharField: semester>)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
has_tag()[源代码]
inner

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

introduction

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

location

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

need_apply

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

need_checkin

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

objects: ActivityManager = <app.models.ActivityManager object>
organization_id

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.

organization_id_id
photos

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.

pool_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.

popular_level(any_status=False)[源代码]
publish_day

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

publish_time

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

recorded

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

related_job_ids()[源代码]
save(*args, **kwargs)[源代码]

Save 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.

semester

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

settle_yqpoint(status: Status | None = None, point: int | None = None)[源代码]

结算活动积分,应仅在活动结束时调用

start

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

status

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

title

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

valid

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

visit_times

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

year

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

class app.models.ActivityPhoto(id, type, image, activity, time)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

ANNOUNCE = 0
SUMMARY = 1
activity

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.

activity_id: int
get_image_path()[源代码]
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)
get_type_display(*, field=<django.db.models.fields.SmallIntegerField: type>)
id

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

image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

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.

type

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

class app.models.ActivitySummary(id, activity, status, image, time)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

CANCELED = 2
CONFIRMED = 1
REFUSED = 3
WAITING = 0
activity

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.

activity_id
get_audit_display()[源代码]
get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)
get_org()[源代码]
get_previous_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
id

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

image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

is_pending()[源代码]
objects = <django.db.models.manager.Manager object>
status

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

time

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

class app.models.Chat(*args, **kwargs)[源代码]

基类:CommentBase

每个Chat支持一对用户间的多次通信,每一条信息是一个Comment记录 一对用户间可以开启多个Chat,进行不同主题的讨论

应用于学术地图的QA功能

exception DoesNotExist

基类:DoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

CLOSED = 1
PROGRESSING = 0
academicqa

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

commentbase_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 a ForwardOneToOneDescriptor instance.

commentbase_ptr_id
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
objects: ChatManager = <app.models.ChatManager object>
questioner

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.

questioner_anonymous

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

questioner_id
respondent

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.

respondent_anonymous

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

respondent_id
save(*args, **kwargs)[源代码]

Save 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.

status

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

title

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

class app.models.Comment(id, commentator, commentbase, text, time)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

comment_photos

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.

commentator

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.

commentator_id
commentbase

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.

commentbase_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>
text

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

time

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

class app.models.CommentBase(*args, **kwargs)[源代码]

基类:Model

带有评论的模型基类

模型性质

  • 可被评论
    • comment类依赖的外键

  • 聚合页面呈现模板
    • 默认呈现内容

    1. 实例名称(模型名<id>, 可通过定义__str__方法重载)

    2. 创建时间

    3. 上次修改时间

    • 显示创建者
      • 需定义`get_poster_name`方法

    • 呈现模板参考各类show.html

  • 审核评论页面模板
    • 显示状态
      • 需定义枚举字段status或`get_status_display`方法

      • 默认以返回的中文字符串决定呈现效果

      1. 包含“未/不/拒绝”的表示失败

      2. 此外包含“通过/接受”的表示审核通过

      3. 包含“修改”的为需要修改(可能用不到)

      4. 包含“取消”的为自己取消

      5. 其他都默认呈现“审核中”

    • 呈现模板参考各类modify.html

继承要求

  • 重载`save`方法
    • typename保存为类名的小写版本或类名,如`commentbase`

    • 在更新模型或对象时,应该调用save方法,从而更新修改时间等信息

  • 定义状态(可选)
    • `status`枚举字段,或`get_status_display`方法

    • 如不重载呈现模板,枚举字段的标签应为中文,或`get_status_display`返回中文

  • 定义创建者信息(可选)
    • `get_poster_name`方法,在审核页面呈现

    • 返回字符串

  • 显示更多信息(可选)
    • 定义`extra_display`方法
      • 返回一个二或三元组构成的列表

      • 每个元素是(键, 值, 图标名="envelope-o")

    • 呈现
      • 在审核页面呈现,发布者信息、修改时间之上,其他预定义信息之下

      • (键, 值, 图标名)将被渲染为一行 [图标]键:值

      • 图标名请参考fontawesome的图标类名

@Author pht @Date 2022-03-11

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

activity

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

chat

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

comments

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.

feedback

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

get_instance()[源代码]
get_next_by_modify_time(*, field=<django.db.models.fields.DateTimeField: modify_time>, is_next=True, **kwargs)
get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)
get_previous_by_modify_time(*, field=<django.db.models.fields.DateTimeField: modify_time>, is_next=False, **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.

modify_time

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

modifyorganization

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

modifyposition

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

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

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.

time

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

typename

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

class app.models.CommentPhoto(id, image, comment)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

comment

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.

comment_id
get_image_path()[源代码]
id

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

image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

objects = <django.db.models.manager.Manager object>
class app.models.Course(*args, **kwargs)[源代码]

基类:Model

助教发布课程需要填写的信息

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

基类:IntegerChoices

AESTHETICS = 3
INTELLECTUAL = 1
LABOUR = 4
MORAL = 0
PHYSICAL = 2
exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

instant = 0
oneday = 1
threeday = 3
twoday = 2
QRcode

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

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

基类:IntegerChoices

ABORT = 0
DRAWING = 3
END = 6
SELECT_END = 5
STAGE1 = 2
STAGE2 = 4
WAITING = 1
capacity

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

classroom

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

courserecord_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.

current_participants

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

get_QRcode_path()[源代码]
get_photo_path()[源代码]
get_semester_display(*, field=<django.db.models.fields.CharField: semester>)
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
get_type_display(*, field=<django.db.models.fields.SmallIntegerField: type>)
id

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

introduction

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.

need_apply

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

objects: CourseManager = <app.models.CourseManager object>
organization

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.

organization_id
participant_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.

photo

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

publish_day

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

record_cal_method

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

save(*args, **kwargs)[源代码]

Save 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.

semester

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

status

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

teacher

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

teaching_plan

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

time_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.

times

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

type

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

year

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

class app.models.CourseParticipant(*args, **kwargs)[源代码]

基类:Model

学生的选课情况

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

FAILED = 3
SELECT = 0
SUCCESS = 2
UNSELECT = 1
course

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.

course_id
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
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>
person

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.

person_id
status

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

class app.models.CourseRecord(*args, **kwargs)[源代码]

基类:Model

学时表

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

attend_times

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

course

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.

course_id
extra_name

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

get_course_name()[源代码]
get_semester_display(*, field=<django.db.models.fields.CharField: semester>)
id

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

invalid

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

objects: CourseRecordManager = <app.models.CourseRecordManager object>
person

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.

person_id
semester

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

total_hours

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

year

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

class app.models.CourseTime(*args, **kwargs)[源代码]

基类:Model

记录课程每周的上课时间,同一课程可以对应多个上课时间

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

activity_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.

course

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.

course_id
cur_week

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

end

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

end_week

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(*, field=<django.db.models.fields.DateTimeField: end>, is_next=True, **kwargs)
get_next_by_start(*, field=<django.db.models.fields.DateTimeField: start>, is_next=True, **kwargs)
get_previous_by_end(*, field=<django.db.models.fields.DateTimeField: end>, is_next=False, **kwargs)
get_previous_by_start(*, field=<django.db.models.fields.DateTimeField: start>, 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

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

class app.models.Freshman(id, sid, name, gender, birthday, place, grade, status)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

REGISTERED = 1
UNREGISTERED = 0
birthday

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

exists()[源代码]
gender

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_birthday(*, field=<django.db.models.fields.DateField: birthday>, is_next=True, **kwargs)
get_previous_by_birthday(*, field=<django.db.models.fields.DateField: birthday>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
grade

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

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>
place

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

sid

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

status

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

class app.models.Help(*args, **kwargs)[源代码]

基类:Model

页面帮助类

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

content

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

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>
title

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

class app.models.HomepageImage(*args, **kwargs)[源代码]

基类:Model

首页上展示的功能介绍图片。之前叫做 guide pictures. 不包含活动宣传、活动总结的图片。

sort_id 域记录的是图片在首页展示时的相对顺序。这个数字越小,越靠前展示。数字相同的图片将以随机顺序展示。

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

activated

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

description

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_upload_date(*, field=<django.db.models.fields.DateTimeField: upload_date>, is_next=True, **kwargs)
get_previous_by_upload_date(*, field=<django.db.models.fields.DateTimeField: upload_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.

image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

objects: HomepageImageManager = <app.models.HomepageImageManager object>
redirect_url

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

sort_id

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

upload_date

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

class app.models.ModifyOrganization(id, typename, time, modify_time, commentbase_ptr, oname, otype, introduction, application, avatar, pos, status, tags)[源代码]

基类:CommentBase

exception DoesNotExist

基类:DoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

CANCELED = 2
CONFIRMED = 1
PENDING = 0
REFUSED = 3
application

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

avatar

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

commentbase_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 a ForwardOneToOneDescriptor instance.

commentbase_ptr_id
extra_display()[源代码]
get_poster_name()[源代码]
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
get_user_ava()[源代码]
introduction

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

is_pending()[源代码]
oname

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

otype

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.

otype_id
pos

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.

pos_id
save(*args, **kwargs)[源代码]

Save 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.

status

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

tags

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

class app.models.ModifyPosition(id, typename, time, modify_time, commentbase_ptr, person, org, pos, reason, status, apply_type)[源代码]

基类:CommentBase

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

基类:TextChoices

JOIN = '加入小组'
TRANSFER = '修改职位'
WITHDRAW = '退出小组'
exception DoesNotExist

基类:DoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

CANCELED = 2
CONFIRMED = 1
PENDING = 0
REFUSED = 3
accept_submit()[源代码]
apply_type

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

commentbase_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 a ForwardOneToOneDescriptor instance.

commentbase_ptr_id
extra_display()[源代码]
get_apply_type_display(*, field=<django.db.models.fields.CharField: apply_type>)
get_poster_name()[源代码]
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
is_pending()[源代码]
org

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.

org_id
person

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.

person_id
pos

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

reason

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

save(*args, **kwargs)[源代码]

Save 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.

status

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

class app.models.ModifyRecord(id, user, usertype, name, info, time)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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.

info

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>
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
usertype

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

class app.models.NaturalPerson(id, person_id, stu_id_dbonly, name, nickname, gender, birthday, email, telephone, biography, avatar, wallpaper, inform_share, last_time_login, QRcode, visit_times, identity, stu_class, stu_major, stu_grade, stu_dorm, status, show_nickname, show_birthday, show_gender, show_email, show_tel, show_major, show_dorm, wechat_receive_level, accept_promote, active_score)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

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

基类:IntegerChoices

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

基类:IntegerChoices

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

基类:IntegerChoices

STUDENT = 1
TEACHER = 0
exception MultipleObjectsReturned

基类:MultipleObjectsReturned

QRcode

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

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

基类:IntegerChoices

LESS = 500
MORE = 0
academictagentry_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.

academictextentry_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.

accept_promote

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

active_score

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

activity_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.

avatar

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

biography

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

birthday

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

courseparticipant_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.

courserecord_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.

email

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

feedback_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_absolute_url(absolute=False)[源代码]

User一对一模型的建议方法

get_accept_promote_display()[源代码]
get_display_name() str[源代码]

User一对一模型的必要方法

get_gender_display(*, field=<django.db.models.fields.SmallIntegerField: gender>)
get_identity_display(*, field=<django.db.models.fields.SmallIntegerField: identity>)
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
get_type() str[源代码]

User一对一模型的必要方法

get_user() User[源代码]

User一对一模型的必要方法

get_user_ava()[源代码]

User一对一模型的建议方法,不存在时返回默认头像

get_wechat_receive_level_display(*, field=<django.db.models.fields.IntegerField: wechat_receive_level>)
id

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

identity

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

incharge

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.

inform_share

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

is_teacher(activate=True)[源代码]
last_time_login

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.

nickname

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

objects: NaturalPersonManager = <app.models.NaturalPersonManager object>
person_id

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

person_id_id
position_application

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.

position_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.

save(*args, **kwargs)[源代码]

Save 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.

show_birthday

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

show_dorm

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

show_email

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

show_gender

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

show_info()[源代码]

返回值为一个列表,在search.html中使用,按照如下顺序呈现: people_field = ['姓名', '年级', '班级', '专业', '状态'] 其中未公开的属性呈现为‘未公开’ 注意:major, gender, nickname, email, tel, dorm可能为None 班级和年级现在好像也可以为None

show_major

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

show_nickname

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

show_tel

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

status

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

stu_class

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

stu_dorm

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

stu_grade

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

stu_id_dbonly

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

stu_major

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

telephone

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

unsubscribe_list

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

visit_times

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

wallpaper

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

wechat_receive_level

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

class app.models.Notification(id, receiver, sender, status, title, content, start_time, finish_time, typename, URL, bulk_identifier, anonymous_flag, relate_instance)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:IntegerChoices

DELETE = 2
DONE = 0
UNDONE = 1
class Title(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]

基类:TextChoices

ACHIEVE_INFORM = '解锁成就通知'
ACTIVITY_INFORM = '活动状态通知'
FEEDBACK_INFORM = '反馈通知'
LOTTERY_INFORM = '抽奖结果通知'
NEW_ORGANIZATION = '新建小组通知'
PENDING_INFORM = '事务开始通知'
POSITION_INFORM = '成员变动通知'
TRANSFER_CONFIRM = '转账确认通知'
TRANSFER_FEEDBACK = '转账回执'
TRANSFER_INFORM = '元气值入账通知'
VERIFY_INFORM = '审核信息通知'
YPLIB_INFORM = '元培书房通知'
YQ_DISTRIBUTION = '元气值发放通知'
class Type(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]

基类:IntegerChoices

NEEDDO = 1
NEEDREAD = 0
URL

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

anonymous_flag

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

bulk_identifier

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

content

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

finish_time

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_start_time(*, field=<django.db.models.fields.DateTimeField: start_time>, is_next=True, **kwargs)
get_previous_by_start_time(*, field=<django.db.models.fields.DateTimeField: start_time>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.SmallIntegerField: status>)
get_title_display()[源代码]
get_typename_display(*, field=<django.db.models.fields.SmallIntegerField: typename>)
id

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

objects: NotificationManager = <app.models.NotificationManager object>
receiver

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.

receiver_id
relate_instance

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.

relate_instance_id
sender

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.

sender_id
start_time

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

status

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

title

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

typename

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

class app.models.Organization(id, organization_id, oname, otype, status, introduction, avatar, QRcode, wallpaper, visit_times, inform_share)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

QRcode

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

activity_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.

avatar

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

course_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.

feedback_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.

feedbacktype_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.

get_absolute_url(absolute=False)[源代码]

User一对一模型的建议方法

get_display_name() str[源代码]

User一对一模型的必要方法

get_subscriber_num(activated=True)[源代码]

仅供前端使用

get_type() str[源代码]

User一对一模型的必要方法

get_user() User[源代码]

User一对一模型的必要方法

get_user_ava()[源代码]

User一对一模型的建议方法,不存在时返回默认头像

id

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

inform_share

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

introduction

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

objects: OrganizationManager = <app.models.OrganizationManager object>
oname

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

organization_id

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

organization_id_id
otype

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.

otype_id
position_application

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.

position_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.

status

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

tags

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

unsubscribers

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

visit_times

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

wallpaper

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

class app.models.OrganizationTag(id, name, color)[源代码]

基类:Model

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

基类:TextChoices

blue = '#1E90FF'
brown = '#DAA520'
coffee = '#8B4513'
green = '#3CB371'
grey = '#C1C1C1'
orange = '#FFA500'
pink = '#FF69B4'
purple = '#800080'
red = '#DC143C'
yellow = '#FFD700'
exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

color

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

get_color_display(*, field=<django.db.models.fields.CharField: color>)
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>
organization_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

class app.models.OrganizationType(otype_id, otype_name, otype_superior_id, incharge, job_name_list, allow_unsubscribe, control_pos_threshold)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

allow_unsubscribe

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

control_pos_threshold

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

default_is_admin(position)[源代码]

供生成时方便调用的函数,是否成为负责人的默认值

default_semester()[源代码]

供生成时方便调用的函数,职位的默认持续时间

feedback_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.

feedbacktype_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.

get_length()[源代码]
get_name(pos: int)[源代码]
get_pos_from_str(pos_name)[源代码]
incharge

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.

incharge_id
job_name_list

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

modifyorganization_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.

objects = <django.db.models.manager.Manager object>
organization_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.

otype_id

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

otype_name

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

otype_superior_id

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

class app.models.Participation(id, activity, person, status)[源代码]

基类:Model

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

基类:TextChoices

APPLYFAILED = '活动申请失败'
APPLYING = '申请中'
APPLYSUCCESS = '已报名'
ATTENDED = '已参与'
CANCELED = '放弃'
UNATTENDED = '未签到'
exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

activity

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.

activity_id
get_participant()[源代码]

供前端使用,追踪该字段的函数

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

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

objects: ParticipationManager = <app.models.ParticipationManager object>
person

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.

person_id
status

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

app.models.Person

NaturalPerson 的别名

class app.models.Pool(id, title, type, entry_time, ticket_price, empty_YQPoint_compensation_lowerbound, empty_YQPoint_compensation_upperbound, start, end, redeem_start, redeem_end, activity)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:TextChoices

EXCHANGE = '兑换'
LOTTERY = '抽奖'
RANDOM = '盲盒'
activity

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.

activity_id
empty_YQPoint_compensation_lowerbound

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

empty_YQPoint_compensation_upperbound

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

end

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

entry_time

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

get_capacity()[源代码]
get_next_by_start(*, field=<django.db.models.fields.DateTimeField: start>, is_next=True, **kwargs)
get_previous_by_start(*, field=<django.db.models.fields.DateTimeField: start>, is_next=False, **kwargs)
get_type_display(*, field=<django.db.models.fields.CharField: type>)
id

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

property items: models.manager.RelatedManager[PoolItem]
objects = <django.db.models.manager.Manager object>
poolitem_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.

poolrecord_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.

redeem_end

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

redeem_start

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

start

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

ticket_price

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

title

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

type

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

class app.models.PoolItem(id, pool, prize, origin_num, consumed_num, exchange_limit, exchange_price, exchange_attributes, is_big_prize, is_empty_prize)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

consumed_num

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

exchange_attributes

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

exchange_limit

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

exchange_price

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

id

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

is_big_prize

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

property is_empty: bool
is_empty_prize

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>
origin_num

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

pool

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.

pool_id
prize

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.

prize_id
class app.models.PoolRecord(id, user, pool, prize, attributes, status, time, redeem_time)[源代码]

基类:Model

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:TextChoices

LOTTERING = '抽奖中'
NOT_LUCKY = '未中奖'
OVERDUE = '已失效'
REDEEMED = '已兑奖'
UN_REDEEM = '未兑奖'
attributes

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_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)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
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>
pool

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.

pool_id
prize

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.

prize_id
redeem_time

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

status

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

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 app.models.Position(*args, **kwargs)[源代码]

基类:Model

职务 职务相关:

  • person: 自然人

  • org: 小组

  • pos: 职务等级

  • status: 职务状态

  • show_post: 是否公开职务

  • year: 学年

  • semester: 学期

成员变动申请相关:
  • apply_type: 申请类型

  • apply_status: 申请状态

  • apply_pos: 申请职务等级

exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:TextChoices

DEPART = '离职'
INSERVICE = '在职'
get_pos_number()[源代码]
get_semester_display(*, field=<django.db.models.fields.CharField: semester>)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

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

is_admin

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

objects: PositionManager = <app.models.PositionManager object>
org

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.

org_id
person

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.

person_id
pos

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

semester

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

show_post

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

status

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

year

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

class app.models.Prize(id, name, more_info, stock, reference_price, image, provider)[源代码]

基类: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.

image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

more_info

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>
poolitem_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.

poolrecord_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.

provider

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.

provider_id
reference_price

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

stock

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

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

基类:TextChoices

ANNUAL = 'Fall+Spring'
FALL = 'Fall'
SPRING = 'Spring'
classmethod get(semester: Semester | str) Semester[源代码]

将一个表示学期的字符串转为返回相应的状态

class app.models.User(*args, **kwargs)[源代码]

基类:AbstractUser, PointMixin

用户模型

Attributes: - id: 用户主键 - username: 用户名,学号 - name: 用户名称 - utype: 用户类型,参考User.Type - 其它继承字段参考AbstractUser

See Also: - UserManager - django.contrib.auth.models.AbstractUser

exception DoesNotExist

基类:ObjectDoesNotExist

MAX_CREDIT: Final = 3
MIN_CREDIT: Final = 0
exception MultipleObjectsReturned

基类:MultipleObjectsReturned

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

基类:TextChoices

ORG = 'Organization'
PERSON = 'Person'
classmethod Persons() list[Type][源代码]
SPECIAL = ''
STUDENT = 'Student'
TEACHER = 'Teacher'
UNAUTHORIZED = 'Unauthorized'
YQpoint

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

academicqaawards

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

accept_anonymous_chat

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

accept_chat

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

achievementunlock_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.

acronym

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

active

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

agreement_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.

answersheet_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.

comment_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.

credit

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

creditrecord_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.

date_joined

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.

email

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

first_name

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

get_full_name() str[源代码]

User的通用方法,展示用户的名称

get_next_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=True, **kwargs)
get_previous_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=False, **kwargs)
get_short_name() str[源代码]

User的通用方法,展示用户的简写

get_utype_display(*, field=<django.db.models.fields.CharField: utype>)
groups

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

id

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

is_active

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

is_newuser

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

is_org() bool[源代码]
is_person() bool[源代码]
is_staff

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

is_student() bool[源代码]
is_superuser

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

is_teacher() bool[源代码]
is_valid() bool[源代码]

返回用户是否合法,存在对应的子类对象

last_login

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

last_name

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

logentry_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.

modify_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.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.

modifyorganization_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.

modulelog_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.

name

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

naturalperson

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

objects: UserManager = <generic.models.UserManager object>
organization

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

pagelog_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.

password

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

permissionblacklist_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.

pinyin

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

poolrecord_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.

prize_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.

receive_chat_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.

recv_notice

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.

send_chat_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.

send_notice

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.

survey_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.

user_permissions

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

username

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

utype: Type | str

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

yqpointrecord_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.

class app.models.Wishes(id, text, time, background)[源代码]

基类:Model

COLORS = ['#FDAFAB', '#FFDAC1', '#FAF1D6', '#B6E3E9', '#B5EAD7', '#E2F0CB']
exception DoesNotExist

基类:ObjectDoesNotExist

exception MultipleObjectsReturned

基类:MultipleObjectsReturned

background

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_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>
rand_color()[源代码]
text

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

time

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