1
from zope.interface import implements
3
from axiom.item import Item
4
from axiom.attributes import path
6
from nevow.inevow import IResource
8
from xmantissa.ixmantissa import IProtocolFactoryFactory
9
from xmantissa.web import AxiomSite
11
from entropy.util import getAppStore
14
# FIXME: This is a blatant rip from Mantissa's code, necessary in order to
15
# customize the root of the site, to avoid having guard wrapped around it.
17
class SimpleSiteFactory(Item):
19
Configuration object for a Mantissa HTTP server.
21
powerupInterfaces = [IProtocolFactoryFactory]
22
implements(*powerupInterfaces)
24
httpLog = path(default=None)
28
Create an L{AxiomSite} which supports authenticated and anonymous
31
logPath = self.httpLog and self.httpLog.path
32
appStore = getAppStore(self.store)
33
return AxiomSite(appStore, IResource(appStore), logPath=logPath)