My approach is using this context_property()
factory in behaviors:
def context_property(name, default=None):
def getter(self, default=default):
return getattr(self.context, name, default)
def setter(self, value):
setattr(self.context, name, value)
def deleter(self):
delattr(self.context, name)
return property(getter, setter, deleter)
```
...
```
@implementer(IGuideline)
@adapter(IConnector)
class Guideline(object):
""" Adapter for Guideline """
def __init__(self, context):
self.context = context
notice = context_property("notice")
portlet_text = context_property("portlet_text", "")
portlet_title = context_property("portlet_title", "")
gl_language = context_property("gl_language")
gl_state = context_property("gl_state", "")
gl_date = context_property("gl_date", "")
```