author | Todd Larsen <tlarsen@google.com> |
Fri, 18 Jul 2008 18:22:23 +0000 | |
changeset 54 | 03e267d67478 |
parent 39 | soc/models/person.py@fa3545f99c02 |
child 78 | 206e6eeed6c4 |
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 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
24 |
from google.appengine.ext import db |
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
25 |
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
|
26 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
27 |
from soc import models |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
28 |
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
|
29 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
30 |
from soc.models import countries |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
31 |
|
8
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
32 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
33 |
class Person(db.Model): |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
34 |
"""Common data fields for all Roles. |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
35 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
36 |
A Person can only participate in a single Program. To avoid duplication of |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
37 |
data entry, facilities will be available for selecting an existing Person |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
38 |
associated with a particular User to be duplicated for participation in a |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
39 |
new Program. |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
40 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
41 |
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
|
42 |
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
|
43 |
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
|
44 |
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
|
45 |
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
|
46 |
|
13
7947bd33ebbf
Clarify back-reference relations the same way that they are documented for
Todd Larsen <tlarsen@google.com>
parents:
8
diff
changeset
|
47 |
A Person entity participates in the following relationships implemented |
7947bd33ebbf
Clarify back-reference relations the same way that they are documented for
Todd Larsen <tlarsen@google.com>
parents:
8
diff
changeset
|
48 |
as a db.ReferenceProperty elsewhere in another db.Model: |
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
49 |
|
8
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
50 |
author) a 1:1 relationship of Person details for a specific Author. |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
51 |
This relation is implemented as the 'author' back-reference Query of |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
52 |
the Author model 'person' reference. |
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 |
docs) a 1:many relationship of documents (Documentation) associated |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
55 |
with the Person by Administrators. This relation is implemented as |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
56 |
the 'docs' back-reference Query of the Documentation model 'person' |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
57 |
reference. |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
58 |
""" |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
59 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
60 |
#: 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
|
61 |
#: 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
|
62 |
#: 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
|
63 |
#: back-reference in the User model is a Query named 'persons'. |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
64 |
user = db.ReferenceProperty(reference_class=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
|
65 |
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
|
66 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
67 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
68 |
# (public) name information |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
69 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
70 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
71 |
#: 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
|
72 |
#: 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
|
73 |
#: 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
|
74 |
#: 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
|
75 |
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
|
76 |
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
|
77 |
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
|
78 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
79 |
#: 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
|
80 |
#: 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
|
81 |
#: 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
|
82 |
#: 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
|
83 |
surname = db.StringProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
84 |
required=True, |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
85 |
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
|
86 |
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
|
87 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
88 |
#: Optional field storing a nickname; displayed publicly. |
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
89 |
#: Nicknames can be any valid UTF-8 text. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
90 |
nickname = db.StringProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
91 |
verbose_name=ugettext_lazy('Nick name')) |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
92 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
93 |
#: 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
|
94 |
#: 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
|
95 |
#: 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
|
96 |
#: 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
|
97 |
#: 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
|
98 |
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
|
99 |
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
|
100 |
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
|
101 |
'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
|
102 |
'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
|
103 |
'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
|
104 |
'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
|
105 |
'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
|
106 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
107 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
108 |
# (public) contact information |
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 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
111 |
#: 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
|
112 |
#: 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
|
113 |
#: kept secret). |
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
114 |
email = db.EmailProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
115 |
required=True, |
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('Email Address')) |
8
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
117 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
118 |
#: 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
|
119 |
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
|
120 |
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
|
121 |
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
|
122 |
'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
|
123 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
124 |
#: 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
|
125 |
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
|
126 |
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
|
127 |
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
|
128 |
'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
|
129 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
130 |
#: 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
|
131 |
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
|
132 |
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
|
133 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
134 |
#: 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
|
135 |
blog = db.LinkProperty( |
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('Blog URL')) |
8
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
137 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
138 |
#: 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
|
139 |
#: 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
|
140 |
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
|
141 |
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
|
142 |
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
|
143 |
'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
|
144 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
145 |
#: 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
|
146 |
#: publicly. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
147 |
latitude = db.FloatProperty( |
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('Latitude')) |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
149 |
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
|
150 |
'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
|
151 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
152 |
#: 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
|
153 |
#: publicly. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
154 |
longitude = db.FloatProperty( |
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('Longitude')) |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
156 |
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
|
157 |
'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
|
158 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
159 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
160 |
# (private) contact information |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
161 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
162 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
163 |
#: 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
|
164 |
#: 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
|
165 |
#: 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
|
166 |
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
|
167 |
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
|
168 |
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
|
169 |
'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
|
170 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
171 |
#: 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
|
172 |
#: 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
|
173 |
#: 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
|
174 |
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
|
175 |
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
|
176 |
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
|
177 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
178 |
#: 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
|
179 |
#: 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
|
180 |
#: 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
|
181 |
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
|
182 |
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
|
183 |
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
|
184 |
'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
|
185 |
'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
|
186 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
187 |
#: 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
|
188 |
#: private. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
189 |
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
|
190 |
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
|
191 |
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
|
192 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
193 |
#: 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
|
194 |
#: 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
|
195 |
#: 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
|
196 |
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
|
197 |
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
|
198 |
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
|
199 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
200 |
#: 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
|
201 |
#: 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
|
202 |
#: 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
|
203 |
#: 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
|
204 |
#: shipping address. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
205 |
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
|
206 |
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
|
207 |
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
|
208 |
'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
|
209 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
210 |
#: 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
|
211 |
#: 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
|
212 |
#: 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
|
213 |
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
|
214 |
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
|
215 |
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
|
216 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
217 |
#: 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
|
218 |
#: 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
|
219 |
#: 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
|
220 |
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
|
221 |
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
|
222 |
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
|
223 |
'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
|
224 |
'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
|
225 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
226 |
#: 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
|
227 |
#: private. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
228 |
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
|
229 |
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
|
230 |
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
|
231 |
|
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
232 |
#: 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
|
233 |
#: 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
|
234 |
#: 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
|
235 |
#: shipping address. |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
236 |
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
|
237 |
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
|
238 |
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
|
239 |
|
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
240 |
#: 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
|
241 |
#: 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
|
242 |
phone = db.PhoneNumberProperty( |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
243 |
required=True, |
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('Phone Number')) |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
245 |
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
|
246 |
'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
|
247 |
|
8
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
248 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
249 |
# (private) personal information |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
250 |
#==================================================================== |
102f69ecb4e4
Initial conversion of the Person Model from PersonModel.wiki to person.py.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
251 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
252 |
#: 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
|
253 |
#: 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
|
254 |
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
|
255 |
required=True, |
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
256 |
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
|
257 |
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
|
258 |
'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
|
259 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
260 |
#: 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
|
261 |
#: kept private. |
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
262 |
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
|
263 |
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
|
264 |
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
|
265 |
|
39
fa3545f99c02
Major revamp of Person model, splitting up poorly-validated properties into
Todd Larsen <tlarsen@google.com>
parents:
13
diff
changeset
|
266 |
#: 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
|
267 |
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
|
268 |
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
|
269 |
choices=('male', 'female')) |