app/soc/models/person.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Tue, 14 Oct 2008 21:06:23 +0000
changeset 327 629cc34e37bf
parent 322 6641e941ef1e
child 385 6d410bf49a82
permissions -rw-r--r--
Move <div id='notice'> into notice block in base.html template. Change formatting of notice block to make it much easier to "parse" visually. This patch is based on comments to r722. http://code.google.com/p/soc/source/detail?r=722 Patch by: Pawel Solyga Review by: to-be-reviewed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     2
#
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     3
# Copyright 2008 the Melange authors.
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     4
#
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
     8
#
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    10
#
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    15
# limitations under the License.
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    16
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    17
"""This module contains the Person Model."""
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    18
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    19
__authors__ = [
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    20
  '"Todd Larsen" <tlarsen@google.com>',
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    21
  '"Sverre Rabbelier" <sverre@rabbelier.nl>',
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    22
]
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.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
322
6641e941ef1e Fixed imports sorting based on comments for r751.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 316
diff changeset
    25
import polymodel
6641e941ef1e Fixed imports sorting based on comments for r751.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 316
diff changeset
    26
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    27
from google.appengine.ext import db
207
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    28
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    29
from django.utils.translation import ugettext_lazy
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    30
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: 78
diff changeset
    31
from soc.models import countries
316
9efdc7bc3565 Add missing blank lines between imports and sort all of the imports.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 207
diff changeset
    32
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    33
import soc.models.user
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    34
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    35
207
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    36
class Person(polymodel.PolyModel):
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    37
  """Common data fields for all persons on the site.
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    38
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    39
  Some details of a Person are considered "public" information, and nearly
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    40
  all of these are optional (except for given_name, surname, and email).
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    41
  Other details of a Person are kept "private" and are only provided to
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    42
  other Persons in roles that "need to know" this information.  How these
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    43
  fields are revealed is usually covered by Program terms of service.
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    44
  """
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    45
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    46
  #: A required many:1 relationship that ties (possibly multiple
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    47
  #: entities of) Person details to a unique User.  A Person cannot
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    48
  #: exist unassociated from a login identity and credentials.  The
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    49
  #: back-reference in the User model is a Query named 'persons'.
207
8ecc2e4198cd Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents: 181
diff changeset
    50
  user = db.ReferenceProperty(reference_class=soc.models.user.User,
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    51
                              required=True, collection_name='persons')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    52
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    53
  #====================================================================
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    54
  #  (public) name information
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    55
  #====================================================================
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    56
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    57
  #: Required field storing the parts of the Person's name
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    58
  #: corresponding to the field names; displayed publicly.
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    59
  #: given_name can only be lower ASCII, not UTF-8 text, because it is
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    60
  #: used, for example, as part of the shipping (mailing) address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    61
  given_name = db.StringProperty(required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    62
      verbose_name=ugettext_lazy('First (given) name'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    63
  given_name.help_text = ugettext_lazy('lower ASCII characters only')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    64
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    65
  #: Required field storing the parts of the Person's name
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    66
  #: corresponding to the field names; displayed publicly.
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    67
  #: Surname can only be lower ASCII, not UTF-8 text, because it is
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    68
  #: used, for example, as part of the shipping (mailing) address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    69
  surname = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    70
      required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    71
      verbose_name=ugettext_lazy('Last (family) name'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    72
  surname.help_text = ugettext_lazy('lower ASCII characters only')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    73
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    74
  #: Optional field used as a display name, such as for awards
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    75
  #: certificates. Should be the entire display name in the format
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    76
  #: the Person would like it displayed (could be surname followed by
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    77
  #: given name in some cultures, for example). Display names can be
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    78
  #: any valid UTF-8 text.
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    79
  display_name = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    80
      verbose_name=ugettext_lazy('Display Name'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    81
  display_name.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    82
      'Optional field used as a display name, such as for awards '
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    83
      'certificates. Should be the entire display name in the format '
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    84
      'the person would like it displayed (could be family name followed '
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    85
      'by given name in some cultures, for example). Display names can be '
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    86
      'any valid UTF-8 text.')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    87
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    88
  #====================================================================
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    89
  #  (public) contact information
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    90
  #====================================================================
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    91
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    92
  #: Required field used as the 'public' contact mechanism for the
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    93
  #: Person (as opposed to the user.id email address which is
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    94
  #: kept secret).
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    95
  email = db.EmailProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    96
      required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    97
      verbose_name=ugettext_lazy('Email Address'))
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    98
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
    99
  #: Optional field storing Instant Messaging network; displayed publicly.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   100
  im_network = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   101
      verbose_name=ugettext_lazy('IM Network'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   102
  im_network.help_text=ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   103
      'examples: irc:irc.freenode.org xmpp:gmail.com/Home')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   104
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   105
  #: Optional field storing Instant Messaging handle; displayed publicly.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   106
  im_handle = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   107
      verbose_name=ugettext_lazy('IM Handle'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   108
  im_handle.help_text=ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   109
      'personal identifier, such as: screen name, IRC nick, user name')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   110
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   111
  #: Optional field storing a home page URL; displayed publicly.
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   112
  home_page = db.LinkProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   113
      verbose_name=ugettext_lazy('Home Page URL'))
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   114
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   115
  #: Optional field storing a blog URL; displayed publicly.
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   116
  blog = db.LinkProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   117
      verbose_name=ugettext_lazy('Blog URL'))
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   118
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   119
  #: Optional field storing a URL to an image, expected to be a
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   120
  #: personal photo (or cartoon avatar, perhaps); displayed publicly.
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   121
  photo_url = db.LinkProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   122
      verbose_name=ugettext_lazy('Thumbnail Photo URL'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   123
  photo_url.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   124
      'URL of 64x64 pixel thumbnail image')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   125
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   126
  #: Optional field storing the latitude provided by the Person; displayed
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   127
  #: publicly.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   128
  latitude = db.FloatProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   129
      verbose_name=ugettext_lazy('Latitude'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   130
  latitude.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   131
      'decimal degrees northerly (N), use minus sign (-) for southerly (S)')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   132
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   133
  #: Optional field storing the longitude provided by the Person; displayed
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   134
  #: publicly.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   135
  longitude = db.FloatProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   136
      verbose_name=ugettext_lazy('Longitude'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   137
  longitude.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   138
      'decimal degrees easterly (E), use minus sign (-) for westerly (W)')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   139
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   140
  #====================================================================
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   141
  # (private) contact information
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   142
  #====================================================================
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   143
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   144
  #: Required field containing residence street address; kept private.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   145
  #: Residence street address can only be lower ASCII, not UTF-8 text, because
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   146
  #: it may be used as a shipping address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   147
  res_street = db.StringProperty(required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   148
      verbose_name=ugettext_lazy('Street address'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   149
  res_street.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   150
      'street number and name, lower ASCII characters only')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   151
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   152
  #: Required field containing residence address city; kept private.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   153
  #: Residence city can only be lower ASCII, not UTF-8 text, because it
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   154
  #: may be used as a shipping address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   155
  res_city = db.StringProperty(required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   156
      verbose_name=ugettext_lazy('City'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   157
  res_city.help_text = ugettext_lazy('lower ASCII characters only')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   158
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   159
  #: Required field containing residence address state or province; kept
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   160
  #: private.  Residence state/province can only be lower ASCII, not UTF-8
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   161
  #: text, because it may be used as a shipping address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   162
  res_state = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   163
      verbose_name=ugettext_lazy('State/Province'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   164
  res_state.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   165
      'optional if country/territory does not have states or provinces, '
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   166
      'lower ASCII characters only')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   167
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   168
  #: Required field containing residence address country or territory; kept
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   169
  #: private.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   170
  res_country = db.StringProperty(required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   171
      verbose_name=ugettext_lazy('Country/Territory'),
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   172
      choices=countries.COUNTRIES_AND_TERRITORIES)
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   173
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   174
  #: Required field containing residence address postal code (ZIP code in
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   175
  #: the United States); kept private.  Residence postal code can only be
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   176
  #: lower ASCII, not UTF-8 text, because it may be used as a shipping address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   177
  res_postalcode = db.StringProperty(required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   178
      verbose_name=ugettext_lazy('ZIP/Postal Code'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   179
  res_postalcode.help_text=ugettext_lazy('lower ASCII characters only')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   180
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   181
  #: Optional field containing a separate shipping street address; kept
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   182
  #: private.  If shipping address is not present in its entirety, the
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   183
  #: residence address will be used instead.  Shipping street address can only
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   184
  #: be lower ASCII, not UTF-8 text, because, if supplied, it is used as a
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   185
  #: shipping address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   186
  ship_street = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   187
      verbose_name=ugettext_lazy('Street address'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   188
  ship_street.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   189
      'street number and name, lower ASCII characters only')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   190
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   191
  #: Optional field containing shipping address city; kept private.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   192
  #: Shipping city can only be lower ASCII, not UTF-8 text, because, if
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   193
  #: supplied, it is used as a shipping address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   194
  ship_city = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   195
      verbose_name=ugettext_lazy('City'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   196
  ship_city.help_text = ugettext_lazy('lower ASCII characters only')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   197
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   198
  #: Optional field containing shipping address state or province; kept
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   199
  #: private.  Shipping state/province can only be lower ASCII, not UTF-8
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   200
  #: text, because, if supplied, it is used as a shipping address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   201
  ship_state = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   202
      verbose_name=ugettext_lazy('State/Province'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   203
  ship_state.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   204
      'optional if country/territory does not have states or provinces, '
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   205
      'lower ASCII characters only')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   206
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   207
  #: Optional field containing shipping address country or territory; kept
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   208
  #: private.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   209
  ship_country = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   210
      verbose_name=ugettext_lazy('Country/Territory'),
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   211
      choices=countries.COUNTRIES_AND_TERRITORIES)
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   212
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   213
  #: Optional field containing shipping address postal code (ZIP code in
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   214
  #: the United States); kept private.  Shipping postal code can only be
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   215
  #: lower ASCII, not UTF-8 text, because, if supplied, it is used as a
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   216
  #: shipping address.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   217
  ship_postalcode = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   218
      verbose_name=ugettext_lazy('ZIP/Postal Code'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   219
  ship_postalcode.help_text=ugettext_lazy('lower ASCII characters only')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   220
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   221
  #: Required field containing a phone number that will be supplied
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   222
  #: to shippers; kept private.
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   223
  phone = db.PhoneNumberProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   224
      required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   225
      verbose_name=ugettext_lazy('Phone Number'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   226
  phone.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   227
      'include complete international calling number with country code')
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   228
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   229
  #====================================================================
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   230
  # (private) personal information
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   231
  #====================================================================
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   232
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   233
  #: Required field containing the Person's birthdate (for
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   234
  #: determining Program participation eligibility); kept private.
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   235
  birth_date = db.DateProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   236
      required=True,
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   237
      verbose_name=ugettext_lazy('Birth Date'))
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   238
  birth_date.help_text = ugettext_lazy(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   239
      'required for determining program eligibility')
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   240
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   241
  #: Optional field indicating choice of t-shirt, from XXS to XXXL;
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   242
  #: kept private.
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   243
  tshirt_size = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   244
      verbose_name=ugettext_lazy('T-shirt Size'),
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   245
      choices=('XXS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'))
8
102f69ecb4e4 Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
   246
39
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   247
  #: Optional field indicating choice of t-shirt fit; kept private.
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   248
  tshirt_style = db.StringProperty(
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   249
      verbose_name=ugettext_lazy('T-shirt Style'),
fa3545f99c02 Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents: 13
diff changeset
   250
      choices=('male', 'female'))