source: main/waeup.custom/trunk/src/waeup/custom/configuration.py @ 7032

Last change on this file since 7032 was 6923, checked in by Henrik Bettermann, 13 years ago

Customize SessionConfiguration? class.

  • Property svn:keywords set to Id
File size: 891 bytes
Line 
1"""
2Containers for session configuration objects.
3"""
4import grok
5from zope.interface import implementedBy
6from waeup.sirp.utils.helpers import attrs_to_fields
7from waeup.sirp.configuration import (
8    SessionConfigurationFactory, SessionConfiguration)
9from waeup.custom.interfaces import (
10    ISessionConfiguration, ISessionConfigurationAdd)
11
12
13class SessionConfiguration(SessionConfiguration):
14    """
15    Customized session configuration model
16    """
17
18    grok.implements(ISessionConfiguration, ISessionConfigurationAdd)
19
20SessionConfiguration = attrs_to_fields(SessionConfiguration)
21
22class 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.