aboutsummaryrefslogtreecommitdiffstats
path: root/cfbe.py
diff options
context:
space:
mode:
authorSteve Losh <steve@stevelosh.com>2009-01-30 20:53:41 -0500
committerSteve Losh <steve@stevelosh.com>2009-01-30 20:53:41 -0500
commit4096632287d468c98d7f808079a3f877e7f55fda (patch)
treec0fa822b8733ebc75061411520e9c07cc8b526e2 /cfbe.py
parentde82c493eab41330169949254a8152f5c7d9302c (diff)
downloadbugseverywhere-4096632287d468c98d7f808079a3f877e7f55fda.tar.gz
Oh my god I have CSS display directives.
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'