diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2006-04-11 09:23:30 -0400 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2006-04-11 09:23:30 -0400 |
commit | 162c3a3783555a11aed72a30369b6dff5e4e0cef (patch) | |
tree | f8d118d80f70ccfc7a6487d1127b84276397909c /beweb | |
parent | 4d61b78146f12a93d4c3a0c3657439102ed8f63d (diff) | |
parent | 3747b40e76b3497da1ad081767e5d64a242deccf (diff) | |
download | bugseverywhere-162c3a3783555a11aed72a30369b6dff5e4e0cef.tar.gz |
Merge from home (TurboGears 0.9)
Diffstat (limited to 'beweb')
49 files changed, 0 insertions, 961 deletions
diff --git a/beweb/Bugs-Everywhere-Web.egg-info/PKG-INFO b/beweb/Bugs-Everywhere-Web.egg-info/PKG-INFO deleted file mode 100644 index 30070c9..0000000 --- a/beweb/Bugs-Everywhere-Web.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: Bugs-Everywhere-Web -Version: 1.0 -Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/beweb/Bugs-Everywhere-Web.egg-info/requires.txt b/beweb/Bugs-Everywhere-Web.egg-info/requires.txt deleted file mode 100644 index b4e1d25..0000000 --- a/beweb/Bugs-Everywhere-Web.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -TurboGears >= 0.8a4
\ No newline at end of file diff --git a/beweb/Bugs-Everywhere-Web.egg-info/sqlobject.txt b/beweb/Bugs-Everywhere-Web.egg-info/sqlobject.txt deleted file mode 100644 index 7f7cbad..0000000 --- a/beweb/Bugs-Everywhere-Web.egg-info/sqlobject.txt +++ /dev/null @@ -1,2 +0,0 @@ -db_module=beweb.model -history_dir=$base/beweb/sqlobject-history diff --git a/beweb/Bugs-Everywhere-Web.egg-info/top_level.txt b/beweb/Bugs-Everywhere-Web.egg-info/top_level.txt deleted file mode 100644 index 74a8358..0000000 --- a/beweb/Bugs-Everywhere-Web.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -beweb diff --git a/beweb/beweb-start.py b/beweb/beweb-start.py deleted file mode 100755 index 3f0f0a6..0000000 --- a/beweb/beweb-start.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python2.4 -import pkg_resources -pkg_resources.require("TurboGears") - -import cherrypy -from os.path import * -import sys - -# first look on the command line for a desired config file, -# if it's not on the command line, then -# look for setup.py in this directory. If it's not there, this script is -# probably installed -cherrypy.config.update(file="common.cfg") -if len(sys.argv) > 1: - cherrypy.config.update(file=sys.argv[1]) -elif exists(join(dirname(__file__), "setup.py")): - cherrypy.config.update(file="dev.cfg") -else: - cherrypy.config.update(file="prod.cfg") - -from beweb.controllers import Root - -cherrypy.root = Root() -cherrypy.server.start() diff --git a/beweb/beweb/__init__.py b/beweb/beweb/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/beweb/beweb/__init__.py +++ /dev/null diff --git a/beweb/beweb/config.py.example b/beweb/beweb/config.py.example deleted file mode 100644 index 8745c6d..0000000 --- a/beweb/beweb/config.py.example +++ /dev/null @@ -1,10 +0,0 @@ -# This is an example beweb configuration file. - -# One thing we need is a map of projects. Projects have a beweb ID, a path, -# and a display name. - -# In this example, the 'be' beweb ID is assigned the display name "Bugs -# Everywhere" and the path "/home/abentley/be" - -projects = {"be": ("Bugs Everywhere","/home/abentley/be"), - } diff --git a/beweb/beweb/controllers.py b/beweb/beweb/controllers.py deleted file mode 100644 index fc505ed..0000000 --- a/beweb/beweb/controllers.py +++ /dev/null @@ -1,201 +0,0 @@ -import turbogears -from turbogears import controllers -import cherrypy -from libbe.bugdir import (tree_root, cmp_severity, new_bug, new_comment, - NoRootEntry) -from libbe import names -from config import projects -from prest import PrestHandler, provide_action - -def project_tree(project): - try: - return tree_root(projects[project][1]) - except KeyError: - raise Exception("Unknown project %s" % project) - -def comment_url(project, bug, comment, **kwargs): - return turbogears.url("/project/%s/bug/%s/comment/%s" % - (project, bug, comment), kwargs) - -class Comment(PrestHandler): - @provide_action("action", "New comment") - def new_comment(self, comment_data, comment, *args, **kwargs): - bug_tree = project_tree(comment_data['project']) - bug = bug_tree.get_bug(comment_data['bug']) - comment = new_comment(bug, "") - comment.content_type = "text/restructured" - comment.save() - raise cherrypy.HTTPRedirect(comment_url(comment=comment.uuid, - **comment_data)) - - @provide_action("action", "Reply") - def reply_comment(self, comment_data, comment, *args, **kwargs): - bug_tree = project_tree(comment_data['project']) - bug = bug_tree.get_bug(comment_data['bug']) - reply_comment = new_comment(bug, "") - reply_comment.in_reply_to = comment.uuid - reply_comment.save() - reply_data = dict(comment_data) - del reply_data["comment"] - raise cherrypy.HTTPRedirect(comment_url(comment=reply_comment.uuid, - **reply_data)) - - @provide_action("action", "Update") - def update(self, comment_data, comment, comment_body, *args, **kwargs): - comment.body = comment_body - comment.save() - raise cherrypy.HTTPRedirect(bug_url(comment_data['project'], - comment_data['bug'])) - - def instantiate(self, project, bug, comment): - bug_tree = project_tree(project) - bug = bug_tree.get_bug(bug) - return bug.get_comment(comment) - - def dispatch(self, comment_data, comment, *args, **kwargs): - return self.edit_comment(comment_data['project'], comment) - - @turbogears.expose(html="beweb.templates.edit_comment") - def edit_comment(self, project, comment): - return {"comment": comment, "project_id": project} - -class Bug(PrestHandler): - comment = Comment() - @turbogears.expose(html="beweb.templates.edit_bug") - def index(self, project, bug): - return {"bug": bug, "project_id": project} - - def dispatch(self, bug_data, bug, *args, **kwargs): - if bug is None: - return self.list(bug_data['project'], **kwargs) - else: - return self.index(bug_data['project'], bug) - - @turbogears.expose(html="beweb.templates.bugs") - def list(self, project, sort_by=None, show_closed=False, action=None, - search=None): - if action == "New bug": - self.new_bug() - if show_closed == "False": - show_closed = False - bug_tree = project_tree(project) - 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, - "project_name" : projects[project][0], - "bugs" : bugs, - "show_closed" : show_closed, - "search" : search, - } - - @provide_action("action", "New bug") - def new_bug(self, bug_data, bug, **kwargs): - bug = new_bug(project_tree(bug_data['project'])) - bug.save() - raise cherrypy.HTTPRedirect(bug_url(bug_data['project'], bug.uuid)) - - @provide_action("action", "Update") - def update(self, bug_data, bug, status, severity, summary, assigned, - action): - bug.status = status - bug.severity = severity - bug.summary = summary - if assigned == "": - assigned = None - bug.assigned = assigned - bug.save() - bug.rcs.precommit(bug.path) - bug.rcs.commit(bug.path, "Auto-commit") - bug.rcs.postcommit(bug.path) - raise cherrypy.HTTPRedirect(bug_list_url(bug_data["project"])) - - def instantiate(self, project, bug): - return project_tree(project).get_bug(bug) - - @provide_action("action", "New comment") - def new_comment(self, bug_data, bug, *args, **kwargs): - try: - self.update(bug_data, bug, *args, **kwargs) - except cherrypy.HTTPRedirect: - pass - return self.comment.new_comment(bug_data, comment=None, *args, - **kwargs) - - -def project_url(project_id=None): - project_url = "/project/" - if project_id is not None: - project_url += "%s/" % project_id - return turbogears.url(project_url) - -def bug_url(project_id, bug_uuid=None): - bug_url = "/project/%s/bug/" % project_id - if bug_uuid is not None: - bug_url += "%s/" % bug_uuid - return turbogears.url(bug_url) - -def bug_list_url(project_id, show_closed=False, search=None): - bug_url = "/project/%s/bug/?show_closed=%s" % (project_id, - str(show_closed)) - if search is not None: - bug_url = "%s&search=%s" % (bug_url, search) - return turbogears.url(str(bug_url)) - - -class Project(PrestHandler): - bug = Bug() - @turbogears.expose(html="beweb.templates.projects") - def dispatch(self, project_data, project, *args, **kwargs): - if project is not None: - raise cherrypy.HTTPRedirect(bug_url(project)) - else: - return {"projects": projects} - - def instantiate(self, project): - return project - - -class Root(controllers.Root): - prest = PrestHandler() - prest.project = Project() - @turbogears.expose() - def index(self): - raise cherrypy.HTTPRedirect(project_url()) - - @turbogears.expose('beweb.templates.about') - def about(self, *paths, **kwargs): - return {} - - @turbogears.expose() - def default(self, *args, **kwargs): - return self.prest.default(*args, **kwargs) - - def _cpOnError(self): - import traceback, StringIO - bodyFile = StringIO.StringIO() - traceback.print_exc(file = bodyFile) - trace_text = bodyFile.getvalue() - try: - raise - except cherrypy.NotFound: - self.handle_error('Not Found', str(e), trace_text, '404 Not Found') - - except NoRootEntry, e: - self.handle_error('Project Misconfiguration', str(e), trace_text) - - except Exception, e: - self.handle_error('Internal server error', str(e), trace_text) - - def handle_error(self, heading, body, traceback=None, - status='500 Internal Server Error'): - cherrypy.response.headerMap['Status'] = status - cherrypy.response.body = [self.errorpage(heading, body, traceback)] - - - @turbogears.expose(html='beweb.templates.error') - def errorpage(self, heading, body, traceback): - return {'heading': heading, 'body': body, 'traceback': traceback} diff --git a/beweb/beweb/formatting.py b/beweb/beweb/formatting.py deleted file mode 100644 index 44ed849..0000000 --- a/beweb/beweb/formatting.py +++ /dev/null @@ -1,73 +0,0 @@ -from StringIO import StringIO - -from elementtree.ElementTree import XML -from libbe.restconvert import rest_xml - -def to_unix(text): - skip_newline = False - for ch in text: - if ch not in ('\r', '\n'): - yield ch - else: - if ch == '\n': - if skip_newline: - continue - else: - skip_newline = True - yield '\n' - - -def soft_text(text): - first_space = False - translations = {'\n': '<br />\n', '&': '&', '\x3c': '<', - '\x3e': '>'} - for ch in to_unix(text): - if ch == ' ' and first_space is True: - yield ' ' - first_space = ch in (' ') - try: - yield translations[ch] - except KeyError: - yield ch - - -def soft_pre(text): - return XML('<div style="font-family: monospace">'+ - ''.join(soft_text(text))+'</div>') - - -def get_rest_body(rest): - xml, warnings = rest_xml(StringIO(rest)) - return xml.find('{http://www.w3.org/1999/xhtml}body'), warnings - - -def comment_body_xhtml(comment): - if comment.content_type == "text/restructured": - return get_rest_body(comment.body)[0] - else: - return soft_pre(comment.body) - - -def select_among(name, options, default, display_names=None): - output = ['<select name="%s">' % name] - for option in options: - if option == default: - selected = ' selected="selected"' - else: - selected = "" - if display_names is None: - display_name = None - else: - display_name = display_names.get(option) - - if option is None: - option = "" - if display_name is None: - display_name = option - value = "" - else: - value = ' value="%s"' % option - output.append("<option%s%s>%s</option>" % (selected, value, - display_name)) - output.append("</select>") - return XML("".join(output)) diff --git a/beweb/beweb/model.py b/beweb/beweb/model.py deleted file mode 100644 index 208f5bb..0000000 --- a/beweb/beweb/model.py +++ /dev/null @@ -1,8 +0,0 @@ -from sqlobject import * -from turbogears.database import PackageHub - -hub = PackageHub("beweb") -__connection__ = hub - -# class YourDataClass(SQLObject): -# pass diff --git a/beweb/beweb/prest.py b/beweb/beweb/prest.py deleted file mode 100644 index e6b7cdf..0000000 --- a/beweb/beweb/prest.py +++ /dev/null @@ -1,159 +0,0 @@ -from unittest import TestCase -import unittest -"""A pseudo-REST dispatching method in which only the noun comes from the path. -The action performed will depend on kwargs. -""" - -class AmbiguousAction(Exception): - def __init__(self, actions): - Exception.__init__(self, "Supplied action is ambiguous.") - self.actions = actions - - -def provide_action(name, value): - def provider(func): - func._action_desc = (name, value) - return func - return provider - -class PrestHandler(object): - def __init__(self): - object.__init__(self) - self.actions = {} - for member in (getattr(self, m) for m in dir(self)): - if not hasattr(member, '_action_desc'): - continue - name, value = member._action_desc - if name not in self.actions: - self.actions[name] = {} - self.actions[name][value] = member - - @classmethod - def add_action(klass, name, value, function): - if name not in klass.actions: - klass.actions[name] = {} - klass.actions[name][value] = function - - - def decode(self, path, data=None): - """Convert the path into a handler, a resource, data, and extra_path""" - if data is None: - data = {} - if len(path) < 2 or not (hasattr(self, path[1])): - if len(path) == 0: - resource = None - else: - resource = self.instantiate(**data) - return self, resource, data, path[1:] - if len(path) > 2: - data[path[1]] = path[2] - return getattr(self, path[1]).decode(path[2:], data) - - def default(self, *args, **kwargs): - child, resource, data, extra = self.decode([None,] + list(args)) - action = child.get_action(**kwargs) - new_args = ([data, resource]+extra) - if action is not None: - return action(*new_args, **kwargs) - else: - return child.dispatch(*new_args, **kwargs) - - def get_action(self, **kwargs): - """Return the action requested by kwargs, if any. - - Raises AmbiguousAction if more than one action matches. - """ - actions = [] - for key in kwargs: - if key in self.actions: - if kwargs[key] in self.actions[key]: - actions.append(self.actions[key][kwargs[key]]) - if len(actions) == 0: - return None - elif len(actions) == 1: - return actions[0] - else: - raise AmbiguousAction(actions) - - -class PrestTester(TestCase): - def test_decode(self): - class ProjectHandler(PrestHandler): - actions = {} - def dispatch(self, project_data, project, *args, **kwargs): - self.project_id = project_data['project'] - self.project_data = project_data - self.resource = project - self.args = args - self.kwargs = kwargs - - def instantiate(self, project): - return [project] - - @provide_action('action', 'Save') - def save(self, project_data, project, *args, **kwargs): - self.action = "save" - - @provide_action('behavior', 'Update') - def update(self, project_data, project, *args, **kwargs): - self.action = "update" - - foo = PrestHandler() - foo.project = ProjectHandler() - handler, resource, data, extra = foo.decode([None, 'project', '83', - 'bloop', 'yeah']) - assert handler is foo.project - self.assertEqual({'project': '83'}, data) - self.assertEqual(['bloop', 'yeah'], extra) - foo.default(*['project', '27', 'extra'], **{'a':'b', 'b':'97'}) - self.assertEqual(foo.project.args, ('extra',)) - self.assertEqual(foo.project.kwargs, {'a':'b', 'b':'97'}) - self.assertEqual(foo.project.project_data, {'project': '27'}) - self.assertEqual(foo.project.resource, ['27']) - foo.default(*['project', '27', 'extra'], **{'action':'Save', 'b':'97'}) - self.assertEqual(foo.project.action, 'save') - foo.default(*['project', '27', 'extra'], - **{'behavior':'Update', 'b':'97'}) - self.assertEqual(foo.project.action, 'update') - self.assertRaises(AmbiguousAction, foo.default, - *['project', '27', 'extra'], - **{'behavior':'Update', 'action':'Save', 'b':'97'}) - - class BugHandler(PrestHandler): - actions = {} - def dispatch(self, bug_data, bug, *args, **kwargs): - self.project_id = project_data['project'] - self.project_data = project_data - self.resource = project - self.args = args - self.kwargs = kwargs - - def instantiate(self, project, bug): - return [project, bug] - - @provide_action('action', 'Save') - def save(self, project_data, project, *args, **kwargs): - self.action = "save" - - @provide_action('behavior', 'Update') - def update(self, project_data, project, *args, **kwargs): - self.action = "update" - - foo.project.bug = BugHandler() - handler, resource, data, extra = foo.decode([None, 'project', '83', - 'bug', '92']) - assert handler is foo.project.bug - self.assertEqual(resource[0], '83') - self.assertEqual(resource[1], '92') - self.assertEqual([], extra) - self.assertEqual(data['project'], '83') - self.assertEqual(data['bug'], '92') - -def test(): - patchesTestSuite = unittest.makeSuite(PrestTester,'test') - runner = unittest.TextTestRunner(verbosity=0) - return runner.run(patchesTestSuite) - - -if __name__ == "__main__": - test() diff --git a/beweb/beweb/static/css/style.css b/beweb/beweb/static/css/style.css deleted file mode 100644 index 986950f..0000000 --- a/beweb/beweb/static/css/style.css +++ /dev/null @@ -1,104 +0,0 @@ -table -{ - background-color: black; -} -td -{ - background-color: white; -} -h1 -{ - font-family: "Verdana"; - font-weight: bold; - font-size: 120%; - margin-bottom:0; - color: #990; -} - -tr.closed td -{ - background-color: #ccc; -} - -a:visited, a:link -{ - color: #990; - text-decoration: None; -} -td a:visited, td a:link -{ - display: block; -} -a:visited:hover, a:link:hover -{ - text-decoration: underline; -} -td a:visited:hover, td a:link:hover -{ - color:black; - background-color:#dda; - text-decoration: None; - display: block; -} - -body -{ - font-family: "Verdana"; - font-size:11pt; - background-color: white; -} -.comment -{ -} -.comment table -{ - background-color: transparent; -} -.comment td -{ - background-color: transparent; -} -.comment pre -{ - font-family: "Verdana"; -} -#header -{ - color: black; - font-weight: bold; - background-image: url(/static/images/half-spiral.png); - background-position: right center; - background-repeat: no-repeat; - background-color: #ff0; -} -#header ul.navoption -{ - display: block; - float: right; - margin: 0; - padding-right: 30px; -} -#header li -{ - display: inline; - margin:0; - padding:0; -} -table.insetbox -{ - margin-top: 0.5em; - margin-bottom: 0.5em; -} -.insetbox tr, .insetbox td -{ - margin: 0; - padding: 0; -} -pre.traceback -{ - font-family: Verdana, Ariel, Helvetica, sanserif; -} -tr.even td -{ - background-color: #eee; -} diff --git a/beweb/beweb/static/images/ds-b.png b/beweb/beweb/static/images/ds-b.png Binary files differdeleted file mode 100644 index 790e438..0000000 --- a/beweb/beweb/static/images/ds-b.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds-bl.png b/beweb/beweb/static/images/ds-bl.png Binary files differdeleted file mode 100644 index 5b43259..0000000 --- a/beweb/beweb/static/images/ds-bl.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds-br.png b/beweb/beweb/static/images/ds-br.png Binary files differdeleted file mode 100644 index 6cfd62c..0000000 --- a/beweb/beweb/static/images/ds-br.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds-l.png b/beweb/beweb/static/images/ds-l.png Binary files differdeleted file mode 100644 index a6ce3ce..0000000 --- a/beweb/beweb/static/images/ds-l.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds-r.png b/beweb/beweb/static/images/ds-r.png Binary files differdeleted file mode 100644 index 1ffd6f8..0000000 --- a/beweb/beweb/static/images/ds-r.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds-t.png b/beweb/beweb/static/images/ds-t.png Binary files differdeleted file mode 100644 index 0129b0c..0000000 --- a/beweb/beweb/static/images/ds-t.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds-tl.png b/beweb/beweb/static/images/ds-tl.png Binary files differdeleted file mode 100644 index d616b77..0000000 --- a/beweb/beweb/static/images/ds-tl.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds-tr.png b/beweb/beweb/static/images/ds-tr.png Binary files differdeleted file mode 100644 index 18e542e..0000000 --- a/beweb/beweb/static/images/ds-tr.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds2-b.png b/beweb/beweb/static/images/ds2-b.png Binary files differdeleted file mode 100644 index 05a190e..0000000 --- a/beweb/beweb/static/images/ds2-b.png +++ /dev/null diff --git a/beweb/beweb/static/images/ds2-r.png b/beweb/beweb/static/images/ds2-r.png Binary files differdeleted file mode 100644 index 0c3ea4c..0000000 --- a/beweb/beweb/static/images/ds2-r.png +++ /dev/null diff --git a/beweb/beweb/static/images/favicon.ico b/beweb/beweb/static/images/favicon.ico Binary files differdeleted file mode 100644 index 339d09c..0000000 --- a/beweb/beweb/static/images/favicon.ico +++ /dev/null diff --git a/beweb/beweb/static/images/favicon.png b/beweb/beweb/static/images/favicon.png Binary files differdeleted file mode 100644 index 6dc53ee..0000000 --- a/beweb/beweb/static/images/favicon.png +++ /dev/null diff --git a/beweb/beweb/static/images/half-spiral.png b/beweb/beweb/static/images/half-spiral.png Binary files differdeleted file mode 100644 index cb4b56c..0000000 --- a/beweb/beweb/static/images/half-spiral.png +++ /dev/null diff --git a/beweb/beweb/static/images/is-b.png b/beweb/beweb/static/images/is-b.png Binary files differdeleted file mode 100644 index 25d3cfa..0000000 --- a/beweb/beweb/static/images/is-b.png +++ /dev/null diff --git a/beweb/beweb/static/images/is-bl.png b/beweb/beweb/static/images/is-bl.png Binary files differdeleted file mode 100644 index f496223..0000000 --- a/beweb/beweb/static/images/is-bl.png +++ /dev/null diff --git a/beweb/beweb/static/images/is-br.png b/beweb/beweb/static/images/is-br.png Binary files differdeleted file mode 100644 index 74cbd91..0000000 --- a/beweb/beweb/static/images/is-br.png +++ /dev/null diff --git a/beweb/beweb/static/images/is-l.png b/beweb/beweb/static/images/is-l.png Binary files differdeleted file mode 100644 index dd567fa..0000000 --- a/beweb/beweb/static/images/is-l.png +++ /dev/null diff --git a/beweb/beweb/static/images/is-r.png b/beweb/beweb/static/images/is-r.png Binary files differdeleted file mode 100644 index 9ac4486..0000000 --- a/beweb/beweb/static/images/is-r.png +++ /dev/null diff --git a/beweb/beweb/static/images/is-t.png b/beweb/beweb/static/images/is-t.png Binary files differdeleted file mode 100644 index fbb06c8..0000000 --- a/beweb/beweb/static/images/is-t.png +++ /dev/null diff --git a/beweb/beweb/static/images/is-tl.png b/beweb/beweb/static/images/is-tl.png Binary files differdeleted file mode 100644 index 9336290..0000000 --- a/beweb/beweb/static/images/is-tl.png +++ /dev/null diff --git a/beweb/beweb/static/images/is-tr.png b/beweb/beweb/static/images/is-tr.png Binary files differdeleted file mode 100644 index de74808..0000000 --- a/beweb/beweb/static/images/is-tr.png +++ /dev/null diff --git a/beweb/beweb/static/images/shadows.png b/beweb/beweb/static/images/shadows.png Binary files differdeleted file mode 100644 index 9ddc676..0000000 --- a/beweb/beweb/static/images/shadows.png +++ /dev/null diff --git a/beweb/beweb/static/images/spiral.png b/beweb/beweb/static/images/spiral.png Binary files differdeleted file mode 100644 index b4bcb1e..0000000 --- a/beweb/beweb/static/images/spiral.png +++ /dev/null diff --git a/beweb/beweb/templates/__init__.py b/beweb/beweb/templates/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/beweb/beweb/templates/__init__.py +++ /dev/null diff --git a/beweb/beweb/templates/about.kid b/beweb/beweb/templates/about.kid deleted file mode 100644 index 45d0093..0000000 --- a/beweb/beweb/templates/about.kid +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" - py:extends="'master.kid'"> -<head> - <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> - <title>About Bugs Everywhere</title> -</head> - -<body> -<h1>About Bugs Everywhere</h1> -<p>Bug Everywhere was designed by Aaron Bentley and implemented by Aaron - Bentley and Oleg Romanyshyn. -</p> -<p> - Development is sponsored by - <a href="http://panoramicfeedback.com/">Panoramic Feedback</a>. -</p> -<p> - Bugs Everywhere <a href="http://panoramicfeedback.com/opensource">web site</a> -</p> -<a href="/">Project List</a> -</body> -</html> diff --git a/beweb/beweb/templates/bugs.kid b/beweb/beweb/templates/bugs.kid deleted file mode 100644 index b83a593..0000000 --- a/beweb/beweb/templates/bugs.kid +++ /dev/null @@ -1,49 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<?python -from libbe.cmdutil import unique_name -from beweb.controllers import bug_url, project_url, bug_list_url -from beweb.config import people -def row_class(bug, num): - if not bug.active is True: - return "closed" - elif num % 2 == 0: - return "even" - else: - return "odd" - - -def match(bug, show_closed, search): - if not show_closed and not bug.active: - return False - elif search is None: - return True - else: - return search.lower() in bug.summary.lower() -?> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" - py:extends="'master.kid'"> - -<head> - <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> - <title>Bugs for $project_name</title> -</head> - -<body> -<h1>Bug list for ${project_name}</h1> -<table> -<tr><td>ID</td><td>Status</td><td>Severity</td><td>Assigned To</td><td>Comments</td><td>Summary</td></tr> -<div py:for="num, bug in enumerate([b for b in bugs if match(b, show_closed, search)])" py:strip="True"><tr class="${row_class(bug, num)}"><td><a href="${bug_url(project_id, bug.uuid)}">${unique_name(bug, bugs[:])}</a></td><td>${bug.status}</td><td>${bug.severity}</td><td>${people.get(bug.assigned, bug.assigned)}</td><td>${len(list(bug.iter_comment_ids()))}</td><td>${bug.summary}</td></tr> -</div> -</table> -<a href="${project_url()}">Project list</a> -<a href="${bug_list_url(project_id, not show_closed, search)}">Toggle closed</a> -<form action="${bug_list_url(project_id)}" method="post"> -<input type="submit" name="action" value="New bug"/> -</form> -<form action="${bug_list_url(project_id)}" method="get"> -<input type="hidden" name="show_closed" value="False" /> -<input name="search" /> -<input type="submit" name="action" value="Search" /> -</form> -</body> -</html> diff --git a/beweb/beweb/templates/edit_bug.kid b/beweb/beweb/templates/edit_bug.kid deleted file mode 100644 index c31d660..0000000 --- a/beweb/beweb/templates/edit_bug.kid +++ /dev/null @@ -1,51 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<?python -from libbe.bugdir import severity_levels, active_status, inactive_status, thread_comments -from libbe.utility import time_to_str -from beweb.controllers import bug_list_url, comment_url -from beweb.config import people -from beweb.formatting import comment_body_xhtml, select_among -?> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" - py:extends="'master.kid'"> - -<head> - <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> - <title>Edit bug</title> -</head> - -<body> -<h1>Edit bug</h1> -<form method="post" action="."> -<table> -<tr><td>Status</td><td>Severity</td><td>Assigned To</td><td>Summary</td></tr> -<tr><td>${select_among("status", active_status+inactive_status, bug.status)}</td><td>${select_among("severity", severity_levels, bug.severity)}</td> -<td>${select_among("assigned", people.keys()+[None], bug.assigned, people)}</td><td><input name="summary" value="${bug.summary}" size="80" /></td></tr> -</table> -<div py:def="show_comment(comment, children)" class="comment"> - <insetbox> - <table> - <tr><td>From</td><td>${comment.From}</td></tr> - <tr><td>Date</td><td>${time_to_str(comment.date)}</td></tr> - </table> - <div py:content="comment_body_xhtml(comment)" py:strip="True"></div> - <a href="${comment_url(project_id, bug.uuid, comment.uuid)}">Edit</a> - <a href="${comment_url(project_id, bug.uuid, comment.uuid, - action='Reply')}">Reply</a> - </insetbox> - <div style="margin-left:20px;"> - <div py:for="child, grandchildren in children" py:strip="True"> - ${show_comment(child, grandchildren)} - </div> - </div> -</div> -<div py:for="comment, children in thread_comments(bug.list_comments())" - py:strip="True"> - ${show_comment(comment, children)} -</div> -<p><input type="submit" name="action" value="Update"/></p> -<p><input type="submit" name="action" value="New comment"/></p> -</form> -<a href="${bug_list_url(project_id)}">Bug List</a> -</body> -</html> diff --git a/beweb/beweb/templates/edit_comment.kid b/beweb/beweb/templates/edit_comment.kid deleted file mode 100644 index 551db9d..0000000 --- a/beweb/beweb/templates/edit_comment.kid +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<?python -from libbe.bugdir import severity_levels -from libbe.utility import time_to_str -from beweb.controllers import bug_list_url, bug_url -?> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" - py:extends="'master.kid'"> - -<head> - <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> - <title>Edit comment</title> -</head> - -<body> -<h1>Edit comment</h1> -<form method="post"> -<table> - <tr><td>From</td><td>${comment.From}</td></tr> - <tr><td>Date</td><td>${time_to_str(comment.date)}</td></tr> -</table> -<insetbox><textarea rows="15" cols="80" py:content="comment.body" name="comment_body" style="border-style: none"/></insetbox> -<p><input type="submit" name="action" value="Update"/></p> -</form> -<a href="${bug_url(project_id, comment.bug.uuid)}">Up to Bug</a> -</body> -</html> diff --git a/beweb/beweb/templates/error.kid b/beweb/beweb/templates/error.kid deleted file mode 100644 index bc55615..0000000 --- a/beweb/beweb/templates/error.kid +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" - py:extends="'master.kid'"> -<head> - <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> - <title>BE Error: ${heading}</title> -</head> - -<body> -<h1 py:content="heading">Error heading</h1> -<div py:replace="body" >Error Body</div> -<pre py:content="traceback" class="traceback">Traceback</pre> -</body> -</html> diff --git a/beweb/beweb/templates/master.kid b/beweb/beweb/templates/master.kid deleted file mode 100644 index 6610d00..0000000 --- a/beweb/beweb/templates/master.kid +++ /dev/null @@ -1,51 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<?python import sitetemplate ?> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate"> - -<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'"> - <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> - <title py:if="False">Your title goes here</title> - <link rel="stylesheet" type="text/css" href="/static/css/style.css"/> - <div py:replace="item[:]"/> -</head> - -<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'"> -<div id="header"><div style="float: left">b u g s e v r y w h e r e</div><ul class="navoption"><li><a href="/about/">About</a></li></ul> </div> - <div py:if="tg_flash" class="flash" py:content="tg_flash"></div> - - <div py:replace="item[:]"/> -</body> -<table py:match="item.tag=='{http://www.w3.org/1999/xhtml}insetbox'" cellspacing="0" cellpadding="0" border="0" class="insetbox"> -<tr height="19"><td background="/static/images/is-tl.png" width="19"/> - <td background="/static/images/is-t.png" /> - <td background="/static/images/is-tr.png" width="11"></td> -</tr> -<tr> - <td background="/static/images/is-l.png"/> - <td py:content="item[:]"> Hello, this is some random text</td> - <td background="/static/images/is-r.png"/> -</tr> -<tr height="11"> - <td background="/static/images/is-bl.png"/> - <td background="/static/images/is-b.png" /> - <td background="/static/images/is-br.png"/> -</tr> -</table> -<table py:match="item.tag=='{http://www.w3.org/1999/xhtml}dsbox'" cellspacing="0" cellpadding="0" border="0" class="dsbox"> -<tr height="11"><td background="/static/images/ds-tl.png" width="11"/> - <td background="/static/images/ds-t.png" /> - <td background="/static/images/ds-tr.png" width="19"></td> -</tr> -<tr> - <td background="/static/images/ds-l.png"/> - <td py:content="item[:]"> Hello, this is some random text</td> - <td background="/static/images/ds2-r.png"/> -</tr> -<tr height="19"> - <td background="/static/images/ds-bl.png"/> - <td background="/static/images/ds2-b.png" /> - <td background="/static/images/ds-br.png"/> -</tr> -</table> - -</html> diff --git a/beweb/beweb/templates/projects.kid b/beweb/beweb/templates/projects.kid deleted file mode 100644 index 09bde77..0000000 --- a/beweb/beweb/templates/projects.kid +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<?python -from libbe.bugdir import severity_levels -def select_among(name, options, default): - output = ['<select name="%s">' % name] - for option in options: - if option == default: - selected = ' selected="selected"' - else: - selected = "" - output.append("<option%s>%s</option>" % (selected, option)) - output.append("</select>") - return XML("".join(output)) -?> -<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" - py:extends="'master.kid'"> -<?python -project_triples = [(pn, pid, pl) for pid,(pn, pl) in projects.iteritems()] -project_triples.sort() -?> -<head> - <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> - <title>Project List</title> -</head> - -<body> -<h1>Project List</h1> -<table> -<tr py:for="project_name, project_id, project_loc in project_triples"><td><a href="/project/${project_id}/">${project_name}</a></td></tr> -</table> -</body> -</html> diff --git a/beweb/common.cfg b/beweb/common.cfg deleted file mode 100644 index de0d84f..0000000 --- a/beweb/common.cfg +++ /dev/null @@ -1,9 +0,0 @@ -# This is where all of your settings go for your development environment -[/static] -staticFilter.on = True -staticFilter.dir = "static" -[/favicon.ico] -staticFilter.on = True -staticFilter.file = "static/images/favicon.ico" -[/] -decodingFilter.on = True diff --git a/beweb/dev.cfg b/beweb/dev.cfg deleted file mode 100644 index 4fd8903..0000000 --- a/beweb/dev.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# This is where all of your settings go for your development environment - -[global] - -# DATABASE - -# pick the form for your database -# sqlobject.dburi="postgres://username@hostname/databasename" -# sqlobject.dburi="mysql://username:password@hostname:port/databasename" -# sqlobject.dburi="sqlite:///file_name_and_path" - -# for Windows users, sqlite URIs look like: -# sqlobject.dburi="sqlite:///drive_letter|/path/to/file" - - -# VIEW - -# kid.outputformat="html" - -# The sitetemplate is used for overall styling of a site that -# includes multiple TurboGears applications -# tg.sitetemplate="<packagename.templates.templatename>" - - -# SERVER - -# Some server parameters that you may want to tweak -# server.socketPort=8080 - -# Disable the debug output at the end on pages. -# logDebugInfoFilter.on = False - -server.environment="development" -autoreload.package="beweb" diff --git a/beweb/libbe b/beweb/libbe deleted file mode 120000 index 6081eee..0000000 --- a/beweb/libbe +++ /dev/null @@ -1 +0,0 @@ -../libbe/
\ No newline at end of file diff --git a/beweb/prod.cfg b/beweb/prod.cfg deleted file mode 100644 index 21eb08e..0000000 --- a/beweb/prod.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# This is where all of your settings go for your development environment - -[global] - -# DATABASE - -# pick the form for your database -# sqlobject.dburi="postgres://username@hostname/databasename" -# sqlobject.dburi="mysql://username:password@hostname:port/databasename" -# sqlobject.dburi="sqlite:///file_name_and_path" - -# for Windows users, sqlite URIs look like: -# sqlobject.dburi="sqlite:///drive_letter|/path/to/file" - - -# VIEW - -# kid.outputformat="html" - -# The sitetemplate is used for overall styling of a site that -# includes multiple TurboGears applications -# tg.sitetemplate="<packagename.templates.templatename>" - - -# Server configuration -server.environment="production" -server.logFile="server.log" -server.logToScreen=False - -# if this is part of a larger site, you can set the path -# to the TurboGears instance here -# server.webpath="" - diff --git a/beweb/server.log b/beweb/server.log deleted file mode 100644 index fe02ade..0000000 --- a/beweb/server.log +++ /dev/null @@ -1,26 +0,0 @@ -2005/12/01 15:44:05 CONFIG INFO Server parameters: -2005/12/01 15:44:05 CONFIG INFO server.environment: production -2005/12/01 15:44:05 CONFIG INFO server.logToScreen: False -2005/12/01 15:44:05 CONFIG INFO server.logFile: server.log -2005/12/01 15:44:05 CONFIG INFO server.protocolVersion: HTTP/1.0 -2005/12/01 15:44:05 CONFIG INFO server.socketHost: -2005/12/01 15:44:05 CONFIG INFO server.socketPort: 8080 -2005/12/01 15:44:05 CONFIG INFO server.socketFile: -2005/12/01 15:44:05 CONFIG INFO server.reverseDNS: False -2005/12/01 15:44:05 CONFIG INFO server.socketQueueSize: 5 -2005/12/01 15:44:05 CONFIG INFO server.threadPool: 0 -2005/12/01 15:44:05 HTTP INFO Serving HTTP on http://localhost:8080/ -2005/12/01 15:44:17 HTTP INFO 127.0.0.1 - GET / HTTP/1.1 -2005/12/01 15:44:37 HTTP INFO 192.168.2.12 - GET / HTTP/1.1 -2005/12/01 15:44:42 HTTP INFO 192.168.2.12 - GET /be HTTP/1.1 -2005/12/01 15:44:43 HTTP INFO 192.168.2.12 - GET /be/301724b1-3853-4aff-8f23-44373df7cf1c HTTP/1.1 -2005/12/01 15:44:48 HTTP INFO 192.168.2.12 - GET /be/ HTTP/1.1 -2005/12/01 15:44:50 HTTP INFO 192.168.2.12 - GET / HTTP/1.1 -2005/12/01 15:44:53 HTTP INFO 192.168.2.12 - GET /devel/ HTTP/1.1 -2005/12/01 15:44:58 HTTP INFO 192.168.2.12 - GET / HTTP/1.1 -2005/12/01 15:52:57 HTTP INFO 127.0.0.1 - GET /devel HTTP/1.1 -2005/12/01 15:52:59 HTTP INFO 127.0.0.1 - GET /devel HTTP/1.1 -2005/12/01 15:53:25 HTTP INFO 127.0.0.1 - GET /devel HTTP/1.1 -2005/12/01 15:53:29 HTTP INFO <Ctrl-C> hit: shutting down server -2005/12/01 15:53:29 HTTP INFO HTTP Server shut down -2005/12/01 15:53:29 HTTP INFO CherryPy shut down diff --git a/beweb/setup.py b/beweb/setup.py deleted file mode 100644 index a382ed9..0000000 --- a/beweb/setup.py +++ /dev/null @@ -1,18 +0,0 @@ -from setuptools import setup, find_packages -from turbogears.finddata import find_package_data - -setup( - name="Bugs Everywhere Web", - version="1.0", - #description="", - #author="", - #author_email="", - #url="", - install_requires = ["TurboGears >= 0.8a4"], - scripts = ["beweb-start.py"], - zip_safe=False, - packages=find_packages(), - package_data = find_package_data(where='beweb', - package='beweb'), - ) - |