author | Todd Larsen <tlarsen@google.com> |
Wed, 01 Oct 2008 00:35:29 +0000 | |
changeset 221 | 9cca97feadaa |
parent 207 | 8ecc2e4198cd |
child 316 | 9efdc7bc3565 |
permissions | -rw-r--r-- |
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 |
|
8
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
25 |
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
|
26 |
|
8ecc2e4198cd
Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents:
181
diff
changeset
|
27 |
import polymodel |
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 |
8
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
32 |
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
|
33 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
34 |
|
207
8ecc2e4198cd
Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents:
181
diff
changeset
|
35 |
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
|
36 |
"""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
|
37 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
38 |
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
|
39 |
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
|
40 |
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
|
41 |
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
|
42 |
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
|
43 |
""" |
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 |
#: 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
|
46 |
#: 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
|
47 |
#: 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
|
48 |
#: 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
|
49 |
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
|
50 |
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
|
51 |
|
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 |
# (public) name information |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
54 |
#==================================================================== |
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 |
#: 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
|
57 |
#: 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
|
58 |
#: 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
|
59 |
#: 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
|
60 |
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
|
61 |
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
|
62 |
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
|
63 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
64 |
#: 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
|
65 |
#: 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
|
66 |
#: 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
|
67 |
#: 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
|
68 |
surname = db.StringProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
69 |
required=True, |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
70 |
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
|
71 |
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
|
72 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
73 |
#: 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
|
74 |
#: 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
|
75 |
#: 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
|
76 |
#: 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
|
77 |
#: 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
|
78 |
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
|
79 |
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
|
80 |
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
|
81 |
'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
|
82 |
'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
|
83 |
'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
|
84 |
'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
|
85 |
'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
|
86 |
|
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 |
# (public) contact information |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
89 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
90 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
91 |
#: 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
|
92 |
#: 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
|
93 |
#: kept secret). |
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
94 |
email = db.EmailProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
95 |
required=True, |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
96 |
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
|
97 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
98 |
#: 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
|
99 |
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
|
100 |
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
|
101 |
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
|
102 |
'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
|
103 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
104 |
#: 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
|
105 |
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
|
106 |
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
|
107 |
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
|
108 |
'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
|
109 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
110 |
#: 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
|
111 |
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
|
112 |
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
|
113 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
114 |
#: 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
|
115 |
blog = db.LinkProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
116 |
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
|
117 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
118 |
#: 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
|
119 |
#: 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
|
120 |
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
|
121 |
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
|
122 |
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
|
123 |
'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
|
124 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
125 |
#: 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
|
126 |
#: publicly. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
127 |
latitude = db.FloatProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
128 |
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
|
129 |
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
|
130 |
'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
|
131 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
132 |
#: 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
|
133 |
#: publicly. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
134 |
longitude = db.FloatProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
135 |
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
|
136 |
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
|
137 |
'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
|
138 |
|
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 |
# (private) contact information |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
141 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
142 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
143 |
#: 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
|
144 |
#: 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
|
145 |
#: 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
|
146 |
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
|
147 |
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
|
148 |
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
|
149 |
'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
|
150 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
151 |
#: 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
|
152 |
#: 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
|
153 |
#: 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
|
154 |
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
|
155 |
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
|
156 |
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
|
157 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
158 |
#: 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
|
159 |
#: 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
|
160 |
#: 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
|
161 |
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
|
162 |
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
|
163 |
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
|
164 |
'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
|
165 |
'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
|
166 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
167 |
#: 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
|
168 |
#: private. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
169 |
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
|
170 |
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
|
171 |
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
|
172 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
173 |
#: 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
|
174 |
#: 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
|
175 |
#: 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
|
176 |
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
|
177 |
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
|
178 |
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
|
179 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
180 |
#: 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
|
181 |
#: 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
|
182 |
#: 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
|
183 |
#: 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
|
184 |
#: shipping address. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
185 |
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
|
186 |
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
|
187 |
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
|
188 |
'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
|
189 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
190 |
#: 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
|
191 |
#: 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
|
192 |
#: 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
|
193 |
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
|
194 |
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
|
195 |
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
|
196 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
197 |
#: 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
|
198 |
#: 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
|
199 |
#: 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
|
200 |
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
|
201 |
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
|
202 |
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
|
203 |
'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
|
204 |
'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
|
205 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
206 |
#: 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
|
207 |
#: private. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
208 |
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
|
209 |
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
|
210 |
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
|
211 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
212 |
#: 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
|
213 |
#: 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
|
214 |
#: 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
|
215 |
#: shipping address. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
216 |
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
|
217 |
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
|
218 |
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
|
219 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
220 |
#: 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
|
221 |
#: 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
|
222 |
phone = db.PhoneNumberProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
223 |
required=True, |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
224 |
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
|
225 |
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
|
226 |
'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
|
227 |
|
8
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
228 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
229 |
# (private) personal information |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
230 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
231 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
232 |
#: 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
|
233 |
#: 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
|
234 |
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
|
235 |
required=True, |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
236 |
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
|
237 |
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
|
238 |
'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
|
239 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
240 |
#: 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
|
241 |
#: kept private. |
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
242 |
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
|
243 |
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
|
244 |
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
|
245 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
246 |
#: 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
|
247 |
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
|
248 |
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
|
249 |
choices=('male', 'female')) |