questionnaire.models module¶
- class questionnaire.models.AnswerSheet(id, survey, creator, create_time, status)[源代码]¶
基类:
Model
- exception DoesNotExist¶
基类:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
基类:
MultipleObjectsReturned
- class Status(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]¶
基类:
IntegerChoices
- DRAFT = 0¶
- SUBMITTED = 1¶
- answertext_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- create_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- creator¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- creator_id¶
- get_next_by_create_time(*, field=<django.db.models.fields.DateTimeField: create_time>, is_next=True, **kwargs)¶
- get_previous_by_create_time(*, field=<django.db.models.fields.DateTimeField: create_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.
- 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.
- survey¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- survey_id¶
- class questionnaire.models.AnswerText(*args, **kwargs)[源代码]¶
基类:
Model
回答,按字符串形式储存
- exception DoesNotExist¶
基类:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
基类:
MultipleObjectsReturned
- answersheet¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- answersheet_id¶
- body¶
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>¶
- question¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- question_id¶
- class questionnaire.models.Choice(id, question, order, text)[源代码]¶
基类:
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.
- objects = <django.db.models.manager.Manager object>¶
- order¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- question¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- question_id¶
- text¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class questionnaire.models.Question(id, survey, order, topic, description, type, required)[源代码]¶
基类:
Model
- exception DoesNotExist¶
基类:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
基类:
MultipleObjectsReturned
- class Type(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]¶
基类:
TextChoices
- MULTIPLE = 'MULTIPLE'¶
- RANKING = 'RANKING'¶
- SINGLE = 'SINGLE'¶
- TEXT = 'TEXT'¶
- answertext_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- choices: BaseManager¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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.
- objects = <django.db.models.manager.Manager object>¶
- order¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- required¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- survey¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- survey_id¶
- topic¶
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 questionnaire.models.Survey(id, title, description, creator, status, start_time, end_time, time)[源代码]¶
基类:
Model
- exception DoesNotExist¶
基类:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
基类:
MultipleObjectsReturned
- class Status(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[源代码]¶
基类:
IntegerChoices
- DRAFT = 3¶
- ENDED = 2¶
- PUBLISHED = 1¶
- REVIEWING = 0¶
- 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- creator¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- creator_id¶
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- end_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_end_time(*, field=<django.db.models.fields.DateTimeField: end_time>, is_next=True, **kwargs)¶
- get_next_by_start_time(*, field=<django.db.models.fields.DateTimeField: start_time>, is_next=True, **kwargs)¶
- get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
- get_previous_by_end_time(*, field=<django.db.models.fields.DateTimeField: end_time>, is_next=False, **kwargs)¶
- get_previous_by_start_time(*, field=<django.db.models.fields.DateTimeField: start_time>, is_next=False, **kwargs)¶
- 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.
- objects = <django.db.models.manager.Manager object>¶
- questions: BaseManager¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- 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.
- time¶
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.