equal
deleted
inserted
replaced
38 Like SurveyContent, this model includes dynamic properties |
38 Like SurveyContent, this model includes dynamic properties |
39 corresponding to the fields of the survey. |
39 corresponding to the fields of the survey. |
40 """ |
40 """ |
41 |
41 |
42 #: The survey for which this entity is a record. |
42 #: The survey for which this entity is a record. |
43 survey = db.ReferenceProperty(Survey, |
43 survey = db.ReferenceProperty(Survey, collection_name="survey_records") |
44 collection_name="survey_records") |
|
45 |
44 |
46 #: Date when this record was created. |
45 #: Date when this record was created. |
47 created = db.DateTimeProperty(auto_now_add=True) |
46 created = db.DateTimeProperty(auto_now_add=True) |
48 |
47 |
49 #: Date when this record was last modified. |
48 #: Date when this record was last modified. |
61 values.insert(position, getattr(self, property, None)) |
60 values.insert(position, getattr(self, property, None)) |
62 return values |
61 return values |
63 |
62 |
64 |
63 |
65 class SurveyRecord(BaseSurveyRecord): |
64 class SurveyRecord(BaseSurveyRecord): |
|
65 """Record produced by taking a Survey. |
|
66 """ |
66 |
67 |
67 #: Reference to the User entity which took this survey. |
68 #: Reference to the User entity which took this survey. |
68 user = db.ReferenceProperty(reference_class=soc.models.user.User, |
69 user = db.ReferenceProperty(reference_class=soc.models.user.User, |
69 required=True, collection_name="surveys_taken", |
70 required=True, collection_name="surveys_taken", |
70 verbose_name=ugettext('Taken by')) |
71 verbose_name=ugettext('Taken by')) |