# HG changeset patch # User Todd Larsen # Date 1227344155 0 # Node ID 850d9a5ad8943f42da3f72be047e690f2e77c973 # Parent 217921e76f500c328005708d3b41637cc47d6848 Rename the User.public_name Property to simply 'name' (but leave the verbose name as "Public name"). This is to take advantage of standardizing on 'name' in the common edit template (and possibly other common templates). The Property was renamed because public_name was already a "name", unlike the recent change to the Work Model class, where 'title' was "aliases" using a tiny name() method instead. Patch by: Todd Larsen diff -r 217921e76f50 -r 850d9a5ad894 app/soc/models/user.py --- a/app/soc/models/user.py Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/models/user.py Sat Nov 22 08:55:55 2008 +0000 @@ -77,9 +77,9 @@ #: 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, + name = db.StringProperty(required=True, verbose_name=ugettext_lazy('Public name')) - public_name.help_text = ugettext_lazy( + name.help_text = ugettext_lazy( 'Human-readable name (UTF-8) that will be displayed publicly on the' ' site. While you can use your real name, like "First Last", please' ' keep in mind that this "public name" will be used as your alias' diff -r 217921e76f50 -r 850d9a5ad894 app/soc/templates/soc/document/public.html --- a/app/soc/templates/soc/document/public.html Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/templates/soc/document/public.html Sat Nov 22 08:55:55 2008 +0000 @@ -22,6 +22,6 @@ {% endblock %} {% block body %} -
Created on {{ entity.created }} by {{ entity.author.public_name }}
+
Created on {{ entity.created }} by {{ entity.author.name }}
{{ entity.content|safe }}
{% endblock %} diff -r 217921e76f50 -r 850d9a5ad894 app/soc/templates/soc/host/public.html --- a/app/soc/templates/soc/host/public.html Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/templates/soc/host/public.html Sat Nov 22 08:55:55 2008 +0000 @@ -15,7 +15,7 @@ {% load forms_helpers %} {% block header_title %} -{{ page_name }} for {{ entity.user.public_name }} ({{ entity.given_name }} {{ entity.surname }}) +{{ page_name }} for {{ entity.user.name }} ({{ entity.given_name }} {{ entity.surname }}) {% endblock %} {% block body %} diff -r 217921e76f50 -r 850d9a5ad894 app/soc/templates/soc/user/edit.html --- a/app/soc/templates/soc/user/edit.html Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/templates/soc/user/edit.html Sat Nov 22 08:55:55 2008 +0000 @@ -16,7 +16,7 @@ {% block header_title %} {{ page_name }} {% if existing_user %} -for {{ existing_user.public_name }} +for {{ existing_user.name }} <{{ existing_user.account.email }}> {% endif %} {% endblock %} @@ -43,7 +43,7 @@ {% endif %} {% field_as_table_row form.link_id %} - {% field_as_table_row form.public_name %} + {% field_as_table_row form.name %} {% field_as_table_row form.is_developer %} {% if existing_user.former_accounts %} diff -r 217921e76f50 -r 850d9a5ad894 app/soc/templates/soc/user/edit_self.html --- a/app/soc/templates/soc/user/edit_self.html Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/templates/soc/user/edit_self.html Sat Nov 22 08:55:55 2008 +0000 @@ -16,7 +16,7 @@ {% block page_title %}User Profile{% endblock %} {% block header_title %} {% if user %} -Modify Existing User Profile for {{ user.public_name }} <{{ account.email }}> +Modify Existing User Profile for {{ user.name }} <{{ account.email }}> {% else %} Create a New User Profile for <{{ account.email }}> {% endif %} @@ -30,7 +30,7 @@

- {% field_as_table_row form.public_name %} + {% field_as_table_row form.name %} {% field_as_table_row form.link_id %} diff -r 217921e76f50 -r 850d9a5ad894 app/soc/templates/soc/user/list/user_row.html --- a/app/soc/templates/soc/user/list/user_row.html Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/templates/soc/user/list/user_row.html Sat Nov 22 08:55:55 2008 +0000 @@ -5,6 +5,6 @@ - + diff -r 217921e76f50 -r 850d9a5ad894 app/soc/templates/soc/user/lookup.html --- a/app/soc/templates/soc/user/lookup.html Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/templates/soc/user/lookup.html Sat Nov 22 08:55:55 2008 +0000 @@ -46,7 +46,7 @@ {% if found_user %} - + @@ -88,7 +88,7 @@ {% endif %} diff -r 217921e76f50 -r 850d9a5ad894 app/soc/templates/soc/user/public.html --- a/app/soc/templates/soc/user/public.html Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/templates/soc/user/public.html Sat Nov 22 08:55:55 2008 +0000 @@ -15,14 +15,14 @@ {% load forms_helpers %} {% block header_title %} -{{ page_name }} for {{ entity.public_name }} +{{ page_name }} for {{ entity.name }} {% endblock %} {% block body %}

 
{{ list.item.public_name }}
{{ list.item.name }}
Public name{{ found_user.public_name }}{{ found_user.name }}    
- Edit the User profile of {{ found_user.public_name }}. + Edit the User profile of {{ found_user.name }}.
{% readonly_field_as_table_row entity.fields.link_id.label entity.link_id %} - {% readonly_field_as_table_row entity.fields.public_name.label entity.public_name %} + {% readonly_field_as_table_row entity.fields.name.label entity.name %}

diff -r 217921e76f50 -r 850d9a5ad894 app/soc/views/models/user.py --- a/app/soc/views/models/user.py Sat Nov 22 08:44:54 2008 +0000 +++ b/app/soc/views/models/user.py Sat Nov 22 08:55:55 2008 +0000 @@ -53,8 +53,8 @@ label=soc.models.user.User.link_id.verbose_name, help_text=soc.models.user.User.link_id.help_text) - public_name = forms.CharField( - label=soc.models.user.User.public_name.verbose_name) + name = forms.CharField( + label=soc.models.user.User.name.verbose_name) is_developer = forms.BooleanField(required=False, label=soc.models.user.User.is_developer.verbose_name, @@ -228,7 +228,7 @@ new_link_id = form.cleaned_data.get('link_id') properties = { 'link_id': new_link_id, - 'public_name': form.cleaned_data.get("public_name"), + 'name': form.cleaned_data.get("name"), 'account': account, }