-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathblackmamba.py
More file actions
34 lines (24 loc) · 837 Bytes
/
blackmamba.py
File metadata and controls
34 lines (24 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This file is part of BlackMamba
# Copyright (c) ${year} - damnwidget <damnwidget@localhost>
"""
.. module:: BlackMamba
:platform: Unix, Windows
:synopsis: Black Mamba is a small and simple blog system that uses Mamba
as backend framework
.. moduleauthor:: damnwidget <damnwidget@localhost>
"""
from twisted.web import server
from twisted.application import service
from mamba.application.app import Mamba
from mamba.web.page import Page
def MambaApplicationFactory(settings):
# load the configuration
application = service.MultiService()
application.setName(settings.name)
# register settings through Mamba Borg
app = Mamba(settings)
# create the root page
root = Page(app)
# create the site
mamba_app_site = server.Site(root)
return mamba_app_site, application