Changeset 5736
- Timestamp:
- 12 Feb 2011, 14:47:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py
r5734 r5736 95 95 def getName(context): 96 96 """Construct a name out of an object with prefix and title. 97 98 The `context` has to provide `title_prefix` and `title` 99 attributes. 100 101 >>> from waeup.sirp.utils.helpers import getName 102 >>> class FakeObject(object): 103 ... title_prefix = 'department' 104 ... title = 'Strange Things' 105 >>> getName(FakeObject()) 106 'Department of Strange Things' 107 108 As we can see in the result the `title_prefix` is rendered 109 uppercase. 110 97 111 """ 98 112 prefix = context.title_prefix
Note: See TracChangeset for help on using the changeset viewer.