Esempio n. 1
0
 def commitEditProfile(self, name):
     profile = self.getEditProfile(name)
     if not (IContentTypeScopeProfile.providedBy(profile)):
         raise KeyError('edit profile does not exist')
     new_mapping = profile.mapping
     methods = profile.methods
     metadata = {
         'title': profile.title,
         'description': profile.description,
         # Should really not duplicate this there but this is easy
         # shortcut to take for now.
         'methods': methods,
     }
     new_id = self.addMapping(new_mapping, methods=methods,
         metadata=metadata)
     self.setMappingNameToId(name, new_id)
Esempio n. 2
0
 def setEditProfile(self, name, value):
     assert IContentTypeScopeProfile.providedBy(value) or value is None
     self._edit_mappings[name] = value