equal
deleted
inserted
replaced
28 It's main purpose is for documentation needs. |
28 It's main purpose is for documentation needs. |
29 """ |
29 """ |
30 |
30 |
31 @property |
31 @property |
32 def __doc__(self): |
32 def __doc__(self): |
33 return self._FieldProperty__field.description or super(FieldProperty, self).__doc__ |
33 field = self._FieldProperty__field |
|
34 if field.title and field.description: |
|
35 return '{0}: {1}'.format(field.title, field.description) |
|
36 elif field.title: |
|
37 return field.title |
|
38 else: |
|
39 return super(FieldProperty, self).__doc__ |
34 |
40 |
35 |
41 |
36 class cached(object): |
42 class cached(object): |
37 """Custom property decorator to define a property or function which is calculated only once |
43 """Custom property decorator to define a property or function which is calculated only once |
38 |
44 |