app/soc/modules/ghop/models/comment.py
changeset 2822 387a3b80df05
parent 2789 259ce59acaf7
child 3003 6a84c1ff5b5c
equal deleted inserted replaced
2821:21dd1ee785f5 2822:387a3b80df05
    49   #: invalid: comment is deleted, which is marked as invalid
    49   #: invalid: comment is deleted, which is marked as invalid
    50   status = db.StringProperty(default='valid',
    50   status = db.StringProperty(default='valid',
    51                              choices=['valid','invalid'],
    51                              choices=['valid','invalid'],
    52                              verbose_name=ugettext('Status of this Comment'))
    52                              verbose_name=ugettext('Status of this Comment'))
    53 
    53 
    54   #: Reference property to the task entity under which the comment
       
    55   #: is scoped 
       
    56   scope = db.ReferenceProperty(
       
    57       reference_class=soc.modules.ghop.models.task.GHOPTask,
       
    58       required=True, collection_name='comment_scopes',
       
    59       verbose_name=ugettext('Comment Scope'))
       
    60   scope.help_text = ugettext(
       
    61       'Reference to the task entity under which this comment was posted.')
       
    62 
       
    63   #: Hidden (not displayed to users or editable in forms) cache of the string
       
    64   #: representation of the transitive closure of scopes, for use in URLs.
       
    65   scope_path = db.StringProperty(required=False,
       
    66                                  verbose_name=ugettext('Scope path'))
       
    67   scope_path.help_text = ugettext(
       
    68       'Cache of the string form of the entity scope.')
       
    69 
       
    70   #: A required many:1 relationship with a comment entity indicating
    54   #: A required many:1 relationship with a comment entity indicating
    71   #: the user who provided that comment.
    55   #: the user who provided that comment.
    72   created_by = db.ReferenceProperty(reference_class=soc.models.user.User,
    56   created_by = db.ReferenceProperty(reference_class=soc.models.user.User,
    73                                     required=True,
    57                                     required=True,
    74                                     collection_name="commented_by")
    58                                     collection_name="commented_by")