[gen] Added wrapper.createFrom, similar to wrapper.create, but allows to create an object with data from another object (kind of 'duplicate' functionality).
This commit is contained in:
parent
400158a0a1
commit
4d12293dc8
7 changed files with 70 additions and 34 deletions
|
@ -533,6 +533,11 @@ class Field:
|
|||
return self.default
|
||||
return value
|
||||
|
||||
def getCopyValue(self, obj):
|
||||
'''Gets the value of this field on p_obj as with m_getValue above. But
|
||||
if this value is mutable, get a copy of it.'''
|
||||
return self.getValue(obj)
|
||||
|
||||
def getFormattedValue(self, obj, value, showChanges=False, language=None):
|
||||
'''p_value is a real p_obj(ect) value from a field from this type. This
|
||||
method returns a pretty, string-formatted version, for displaying
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue