Rev | Line | |
---|
[6923] | 1 | """ |
---|
| 2 | Containers for session configuration objects. |
---|
| 3 | """ |
---|
| 4 | import grok |
---|
| 5 | from zope.interface import implementedBy |
---|
| 6 | from waeup.sirp.utils.helpers import attrs_to_fields |
---|
| 7 | from waeup.sirp.configuration import ( |
---|
| 8 | SessionConfigurationFactory, SessionConfiguration) |
---|
| 9 | from waeup.custom.interfaces import ( |
---|
| 10 | ISessionConfiguration, ISessionConfigurationAdd) |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | class SessionConfiguration(SessionConfiguration): |
---|
| 14 | """ |
---|
| 15 | Customized session configuration model |
---|
| 16 | """ |
---|
| 17 | |
---|
| 18 | grok.implements(ISessionConfiguration, ISessionConfigurationAdd) |
---|
| 19 | |
---|
| 20 | SessionConfiguration = attrs_to_fields(SessionConfiguration) |
---|
| 21 | |
---|
| 22 | class SessionConfigurationFactory(SessionConfigurationFactory): |
---|
| 23 | """A customized factory for session configuration objects. |
---|
| 24 | """ |
---|
| 25 | |
---|
| 26 | def __call__(self, *args, **kw): |
---|
| 27 | return SessionConfiguration(*args, **kw) |
---|
| 28 | |
---|
| 29 | def getInterfaces(self): |
---|
| 30 | return implementedBy(SessionConfiguration) |
---|
Note: See
TracBrowser for help on using the repository browser.