Provide a simple method in the Role Model class that aliases the existing
authorTodd Larsen <tlarsen@google.com>
Sun, 23 Nov 2008 06:34:22 +0000
changeset 577 e7cb5819f7e9
parent 576 6614d3f545b7
child 578 0f34318f5693
Provide a simple method in the Role Model class that aliases the existing 'display_name' Property to 'name'. Patch by: Todd Larsen
app/soc/models/role.py
--- a/app/soc/models/role.py	Sun Nov 23 00:44:13 2008 +0000
+++ b/app/soc/models/role.py	Sun Nov 23 06:34:22 2008 +0000
@@ -273,3 +273,8 @@
   tshirt_style = db.StringProperty(
       verbose_name=ugettext_lazy('T-shirt Style'),
       choices=('male', 'female'))
+
+  def name(self):
+    """Alias 'display_name' Property as 'name' for use in common templates.
+    """
+    return self.display_name