Changeset 4457


Ignore:
Timestamp:
28 Jul 2009, 00:12:50 (15 years ago)
Author:
uli
Message:

Add helper function to construct names out of prefixes and titles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/utils/helpers.py

    r4375 r4457  
    9090    return html_code
    9191
     92def getName(context):
     93    """Construct a name out of an object with prefix and title.
     94    """
     95    prefix = context.title_prefix
     96    prefix = prefix[0].upper() + prefix[1:]
     97    return '%s of %s' % (prefix, context.title)
Note: See TracChangeset for help on using the changeset viewer.