app/soc/models/contributor.py
author Todd Larsen <tlarsen@google.com>
Thu, 16 Oct 2008 04:37:13 +0000
changeset 351 b37fc4c1e189
parent 207 8ecc2e4198cd
child 385 6d410bf49a82
permissions -rw-r--r--
Eliminate the Work.abstract property and move the Document.content property to Work.content instead. Update affected views, and re-base some classes that were deriving from Document just to get Document.content to now be derived from Work instead. The Document class now has a "pass" body with no additional properties. It is debatable whether Work should become Document, since I am not sure that we plan to be able to generically display, say, a Quiz or a Question (which are Works) on the home page (which can only specifically display a Document, or now, the basic Work entity...). Patch by: Todd Larsen Review by: to-be-reviewed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     2
#
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     3
# Copyright 2008 the Melange authors.
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     4
#
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     8
# 
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    10
# 
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    16
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    17
"""This module contains the Contributor Model."""
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    18
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    19
__authors__ = [
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    20
  '"Todd Larsen" <tlarsen@google.com>',
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    21
  '"Sverre Rabbelier" <sverre@rabbelier.nl>',
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    22
]
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    23
207
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    24
14
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    25
from google.appengine.ext import db
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    26
207
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    27
import soc.models.role
14
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    28
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    29
207
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    30
class Contributor(soc.models.role.Role):
14
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    31
  """Contributor details for a specific Program.
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    32
181
fdd29818a954 Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 54
diff changeset
    33
  Some Contributor workflows have the Contributor (acting as an author)
14
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    34
  creating Proposals and desiring for one (or more?) of them to be
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    35
  converted into Tasks by Reviewers and Hosts.  Other workflows have the
181
fdd29818a954 Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 54
diff changeset
    36
  Reviewers (acting as an author) proposing Proposals, that Contributors
14
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    37
  claim to convert them into Tasks.
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    38
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    39
  A Contributor entity participates in the following relationships implemented 
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    40
  as a db.ReferenceProperty elsewhere in another db.Model:
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    41
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    42
   tasks)  a many:many relationship associating all of the Tasks to which
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    43
     a specific Contributor has contributed with that Contributor.  See
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    44
     the TasksContributors model for details.
aec6d7b8e745 Initial implementation of the Contributor Model in the contributor.py module.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    45
  """
207
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    46
  pass 
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    47