appy.pod: added param 'stylesMapping' for the 'text' function (which calls 'xhtml' internally); appy.gen: bufgix in the translation system (translation of group-related labels); appy.shared.dav: bugfix while getting the 'content-type' HTTP header key; appy.shared.dav: smart error handling when parsing wrong XML content.
This commit is contained in:
parent
36237c3ee5
commit
4e848ce0a8
3 changed files with 30 additions and 15 deletions
|
@ -1210,15 +1210,20 @@ class BaseMixin:
|
|||
if field:
|
||||
# Maybe we do not have the field itself, but only its name
|
||||
if isinstance(field, basestring):
|
||||
field = self.getAppyType(field, className=className)
|
||||
# Include field-specific mapping if any.
|
||||
fieldMapping = field.mapping[label]
|
||||
if fieldMapping:
|
||||
if callable(fieldMapping):
|
||||
fieldMapping = field.callMethod(self, fieldMapping)
|
||||
mapping.update(fieldMapping)
|
||||
# Get the label
|
||||
label = getattr(field, label+'Id')
|
||||
appyField = self.getAppyType(field, className=className)
|
||||
else:
|
||||
appyField = field
|
||||
if appyField:
|
||||
fieldMapping = appyField.mapping[label]
|
||||
if fieldMapping:
|
||||
if callable(fieldMapping):
|
||||
fieldMapping=appyField.callMethod(self,fieldMapping)
|
||||
mapping.update(fieldMapping)
|
||||
# Get the label
|
||||
label = getattr(appyField, label+'Id')
|
||||
else:
|
||||
# It must be a group.
|
||||
label = '%s_group_%s_%s' % (self.meta_type, field, label)
|
||||
# We will get the translation from a Translation object.
|
||||
# In what language must we get the translation?
|
||||
if not language: language = self.getUserLanguage()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue