app/soc/models/contributor.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Wed, 15 Oct 2008 20:24:02 +0000
changeset 344 d135c8c09967
parent 207 8ecc2e4198cd
child 385 6d410bf49a82
permissions -rw-r--r--
Change verbose_name of founder property in Group model from "Created by" to "Founded by". Add GROUP_TYPE_SHORT and GROUP_TYPE_PLURAL for all models that inherit from Group and use that values in templates and contexts. Assume that group_type, group_type_short and group_type_plural are defined in context and remove not needed ifs in templates. Rename "Linkname" to "Link name" in list/group_heading.html template. Patch by: Pawel Solyga 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