Updated User and Person models.
Patch by: Pawel Solyga
Review by: Todd Larsen
Review issue: 382
Review URL: http://codereviews.googleopensourceprograms.com/382
--- a/app/soc/models/person.py Tue Aug 19 17:49:59 2008 +0000
+++ b/app/soc/models/person.py Tue Aug 19 17:52:13 2008 +0000
@@ -85,11 +85,6 @@
verbose_name=ugettext_lazy('Last (family) name'))
surname.help_text = ugettext_lazy('lower ASCII characters only')
- #: Optional field storing a nickname; displayed publicly.
- #: Nicknames can be any valid UTF-8 text.
- nickname = db.StringProperty(
- verbose_name=ugettext_lazy('Nick name'))
-
#: Optional field used as a display name, such as for awards
#: certificates. Should be the entire display name in the format
#: the Person would like it displayed (could be surname followed by
--- a/app/soc/models/user.py Tue Aug 19 17:49:59 2008 +0000
+++ b/app/soc/models/user.py Tue Aug 19 17:52:13 2008 +0000
@@ -19,9 +19,11 @@
__authors__ = [
'"Todd Larsen" <tlarsen@google.com>',
'"Sverre Rabbelier" <sverre@rabbelier.nl>',
+ '"Pawel Solyga" <pawel.solyga@gmail.com>',
]
from google.appengine.ext import db
+from django.utils.translation import ugettext_lazy
class User(db.Model):
@@ -49,3 +51,15 @@
#: of any Melange application.
id = db.UserProperty(required=True)
+ #: Required field storing a nickname; displayed publicly.
+ #: Nicknames can be any valid UTF-8 text.
+ nick_name = db.StringProperty(required=True,
+ verbose_name=ugettext_lazy('Nick name'))
+
+ #: Required field storing linkname used in URLs to identify user.
+ #: Lower ASCII characters only.
+ link_name = db.StringProperty(required=True,
+ verbose_name=ugettext_lazy('Link name'))
+ link_name.help_text = ugettext_lazy(
+ 'Required field used in URLs to identify user.'
+ 'Lower ASCII characters only')