From d8ddaacebf4f8249f63f1e51d893549cd5ff361b Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Thu, 15 Dec 2005 16:10:20 -0500 Subject: [PATCH] Removed old REST implementation --- beweb/beweb/controllers.py | 49 ------------------------------ beweb/beweb/templates/edit_bug.kid | 3 +- 2 files changed, 2 insertions(+), 50 deletions(-) diff --git a/beweb/beweb/controllers.py b/beweb/beweb/controllers.py index 8ba1595..2fe3d3e 100644 --- a/beweb/beweb/controllers.py +++ b/beweb/beweb/controllers.py @@ -101,52 +101,3 @@ class Root(controllers.Root): @turbogears.expose() def index(self): raise cherrypy.HTTPRedirect(project_url()) - - @turbogears.expose() - def default(self, *args, **kwargs): - if len(args) == 1: - return self.bugs(args[0], **kwargs) - elif len(args) == 2: - return self.bug(*args, **kwargs) - else: - return repr(args) - - - @turbogears.expose(html="beweb.templates.bugs") - def bugs(self, project_id, sort_by=None, show_closed=False): - if show_closed == "False": - show_closed = False - bug_tree = project_tree(project_id) - bugs = list(bug_tree.list()) - if sort_by is None: - def cmp_date(bug1, bug2): - return -cmp(bug1.time, bug2.time) - bugs.sort(cmp_date) - bugs.sort(cmp_severity) - return {"project_id" : project_id, - "project_name" : projects[project_id][0], - "bugs" : bugs, - "show_closed" : show_closed, - } - - @turbogears.expose(html="beweb.templates.edit_bug") - def bug(self, project_id, bug_uuid, action=None, status=None, - severity=None, summary=None): - bug_tree = project_tree(project_id) - if action == "New bug": - bug = bug_tree.new_bug() - bug.creator = names.creator() - bug.severity = "minor" - bug.status = "open" - bug.save() - raise cherrypy.HTTPRedirect(turbogears.url("/%s/%s/" % (project_id, bug.uuid))) - else: - bug = bug_tree.get_bug(bug_uuid) - if action == "Update": - bug.status = status - bug.severity = severity - bug.summary = summary - bug.save() - raise cherrypy.HTTPRedirect(turbogears.url("/%s/" % project_id)) - - return {"bug": bug, "project_id": project_id, "new":True} diff --git a/beweb/beweb/templates/edit_bug.kid b/beweb/beweb/templates/edit_bug.kid index d55ab2e..b328d82 100644 --- a/beweb/beweb/templates/edit_bug.kid +++ b/beweb/beweb/templates/edit_bug.kid @@ -2,6 +2,7 @@ ' % name] for option in options: @@ -39,6 +40,6 @@ def select_among(name, options, default):

-Bug List +Bug List -- 2.26.2