# HG changeset patch
# User Todd Larsen
# Date 1227251275 0
# Node ID 7c5ec72cdcf14c1493d7efd986a211de51aab7f8
# Parent 5e6ae12cc4958e6bdb7dec81c41cb7625c18a699
Replace nick_name and its variants with public_name. Remove the
soc/templates/soc/person/edit.html template, since it does not appear to be
referenced anywhere (and contained a nick_name reference that would otherwise
need to be remedied).
Patch by: Todd Larsen
diff -r 5e6ae12cc495 -r 7c5ec72cdcf1 app/soc/models/user.py
--- a/app/soc/models/user.py Thu Nov 20 23:51:45 2008 +0000
+++ b/app/soc/models/user.py Fri Nov 21 07:07:55 2008 +0000
@@ -74,10 +74,11 @@
#: this User.
former_accounts = db.ListProperty(users.User)
- #: 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 publicly-displayed name. Can be a real name
+ #: (though this is not recommended), or a nick name or some other public
+ #: alias. Public names can be any valid UTF-8 text.
+ public_name = db.StringProperty(required=True,
+ verbose_name=ugettext_lazy('Public name'))
#: Required field storing link_id used in URLs to identify user.
#: Lower ASCII characters only.
diff -r 5e6ae12cc495 -r 7c5ec72cdcf1 app/soc/templates/README.templates
--- a/app/soc/templates/README.templates Thu Nov 20 23:51:45 2008 +0000
+++ b/app/soc/templates/README.templates Fri Nov 21 07:07:55 2008 +0000
@@ -23,6 +23,5 @@
View templates are usually named some_view.html for a corresponding someView()
function and SomeViewForm form class. Since SomeView is likely to be a common
View name for multiple Models, Model-specific templates should be placed in
-soc/ sub-directories. For example, the template used by the Profile
-view for the Person Model belongs in soc/person/profile.html.
+soc// sub-directories.
diff -r 5e6ae12cc495 -r 7c5ec72cdcf1 app/soc/templates/soc/document/public.html
--- a/app/soc/templates/soc/document/public.html Thu Nov 20 23:51:45 2008 +0000
+++ b/app/soc/templates/soc/document/public.html Fri Nov 21 07:07:55 2008 +0000
@@ -22,6 +22,6 @@
{% endblock %}
{% block body %}
-Created on {{ entity.created }} by {{ entity.author.nick_name }}
+Created on {{ entity.created }} by {{ entity.author.public_name }}
{{ entity.content|safe }}
{% endblock %}
diff -r 5e6ae12cc495 -r 7c5ec72cdcf1 app/soc/templates/soc/host/public.html
--- a/app/soc/templates/soc/host/public.html Thu Nov 20 23:51:45 2008 +0000
+++ b/app/soc/templates/soc/host/public.html Fri Nov 21 07:07:55 2008 +0000
@@ -15,7 +15,7 @@
{% load forms_helpers %}
{% block header_title %}
-{{ page_name }} for {{ entity.user.nick_name }} ({{ entity.given_name }} {{ entity.surname }})
+{{ page_name }} for {{ entity.user.public_name }} ({{ entity.given_name }} {{ entity.surname }})
{% endblock %}
{% block body %}
diff -r 5e6ae12cc495 -r 7c5ec72cdcf1 app/soc/templates/soc/person/edit.html
--- a/app/soc/templates/soc/person/edit.html Thu Nov 20 23:51:45 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-{% comment %}
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-{% endcomment %}
-{% load forms_helpers %}
-
-
-
- Profile
- {% block 'stylesheet' %}{% endblock %}
-
-
-
- {% block 'logo' %}
-
- {% endblock %}
-
- {% block 'greeting' %}
- Welcome, {{user.nickname}}.
- {% endblock %}
-
-
- {% block 'instructions' %}
- Please update your profile:
- {% endblock %}
-
-
-
-
-
-
diff -r 5e6ae12cc495 -r 7c5ec72cdcf1 app/soc/templates/soc/user/edit.html
--- a/app/soc/templates/soc/user/edit.html Thu Nov 20 23:51:45 2008 +0000
+++ b/app/soc/templates/soc/user/edit.html Fri Nov 21 07:07:55 2008 +0000
@@ -16,7 +16,7 @@
{% block header_title %}
{{ page_name }}
{% if existing_user %}
-for {{ existing_user.nick_name }}
+for {{ existing_user.public_name }}
<{{ existing_user.account.email }}>
{% endif %}
{% endblock %}
@@ -43,7 +43,7 @@
{% endif %}
{% field_as_table_row form.link_id %}
- {% field_as_table_row form.nick_name %}
+ {% field_as_table_row form.public_name %}
{% field_as_table_row form.is_developer %}
{% if existing_user.former_accounts %}
diff -r 5e6ae12cc495 -r 7c5ec72cdcf1 app/soc/templates/soc/user/edit_self.html
--- a/app/soc/templates/soc/user/edit_self.html Thu Nov 20 23:51:45 2008 +0000
+++ b/app/soc/templates/soc/user/edit_self.html Fri Nov 21 07:07:55 2008 +0000
@@ -16,7 +16,7 @@
{% block page_title %}User Profile{% endblock %}
{% block header_title %}
{% if user %}
-Modify Existing User Profile for {{ user.nick_name }} <{{ account.email }}>
+Modify Existing User Profile for {{ user.public_name }} <{{ account.email }}>
{% else %}
Create a New User Profile for <{{ account.email }}>
{% endif %}
@@ -30,7 +30,7 @@