File: pastebin.tac

package info (click to toggle)
nevow 0.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,264 kB
  • ctags: 5,311
  • sloc: python: 21,511; ansic: 136; sh: 65; xml: 42; makefile: 32; sql: 5
file content (25 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (7)
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
from twisted.application import strports
from twisted.application import service

from twisted.web import static

from nevow import appserver
from nevow import vhost

from pastebin import interfaces
from pastebin.service import FSPasteBinService
from pastebin.web import pages


application = service.Application('pastebin')

pastebin = FSPasteBinService('data')
pastebin.setServiceParent(application)

appResource = pages.RootPage(pastebin)
appResource.putChild('robots.txt', static.File('static/robots.txt'))
vResource = vhost.VHostMonsterResource()
appResource.putChild('vhost', vResource)


strports.service("8080", appserver.NevowSite(appResource)).setServiceParent(application)