aboutsummaryrefslogtreecommitdiffstats
path: root/cfbe.py
diff options
context:
space:
mode:
Diffstat (limited to 'cfbe.py')
-rwxr-xr-xcfbe.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/cfbe.py b/cfbe.py
index f8e1321..1628fa6 100755
--- a/cfbe.py
+++ b/cfbe.py
@@ -4,7 +4,7 @@ import cherrypy
from libbe import bugdir
from jinja2 import Environment, FileSystemLoader
-bug_root = '/Users/sjl/Documents/stevelosh/.be'
+bug_root = '/Users/sjl/Documents/cherryflavoredbugseverywhere/.be'
bd = bugdir.BugDir(root=bug_root)
bd.load_all_bugs()
@@ -15,9 +15,17 @@ class WebInterface:
"""The web interface to CFBE."""
@cherrypy.expose
- def index(self):
+ def index(self, status='open'):
+ bd.load_all_bugs()
+ if status == 'open':
+ status = ['open', 'assigned', 'test', 'unconfirmed', 'wishlist']
+ label = 'Open'
+ elif status == 'closed':
+ status = ['closed', 'disabled', 'fixed', 'wontfix']
+ label = 'Closed'
template = env.get_template('list.html')
- return template.render(bugs=bd)
+ bugs = [bug for bug in bd if bug.status in status]
+ return template.render(bugs=bugs, bd=bd, label=label)
config = '/Users/sjl/Documents/cherryflavoredbugseverywhere/cfbe.config'