aboutsummaryrefslogtreecommitdiffstats
path: root/cfbe.py
blob: 6a9fec3793ab72240a67f53104c250b49a96393c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python

import cherrypy
from libbe import bugdir
from jinja2 import Environment, FileSystemLoader

bug_root = '/Users/sjl/Documents/stevelosh/.be'
bd = bugdir.BugDir(root=bug_root)
bd.load_all_bugs()

template_root = '/Users/sjl/Documents/cherryflavoredbugseverywhere/templates'
env = Environment(loader=FileSystemLoader(template_root))

class WebInterface:
    """The web interface to CFBE."""
    
    @cherrypy.expose
    def index(self):
        template = env.get_template('base.html')
        return template.render(bugs=bd)
    

config = '/Users/sjl/Documents/cherryflavoredbugseverywhere/cfbe.config'
cherrypy.quickstart(WebInterface(), '/', config)