diff options
author | Steve Losh <steve@stevelosh.com> | 2009-01-30 20:53:41 -0500 |
---|---|---|
committer | Steve Losh <steve@stevelosh.com> | 2009-01-30 20:53:41 -0500 |
commit | 4096632287d468c98d7f808079a3f877e7f55fda (patch) | |
tree | c0fa822b8733ebc75061411520e9c07cc8b526e2 /cfbe.py | |
parent | de82c493eab41330169949254a8152f5c7d9302c (diff) | |
download | bugseverywhere-4096632287d468c98d7f808079a3f877e7f55fda.tar.gz |
Oh my god I have CSS display directives.
Diffstat (limited to 'cfbe.py')
-rwxr-xr-x | cfbe.py | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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' |