aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/web/cfbe.py
diff options
context:
space:
mode:
authorAnand Aiyer <aaiyer@gmail.com>2016-10-31 16:27:01 +0530
committerMatěj Cepl <mcepl@cepl.eu>2024-01-18 19:01:59 +0100
commit4f7099d9c808fa646f24540039af4ee8e7f943ab (patch)
tree326e4a847a448791ae9c0f4ee0af89c1257adc94 /interfaces/web/cfbe.py
parent5e1b5fe911d4805133357e329d009f998300867d (diff)
downloadbugseverywhere-4f7099d9c808fa646f24540039af4ee8e7f943ab.tar.gz
* Forked bugseverywhere -- so update the README
* Fix web interface issue with editing a bug * Integrate the web interface into the be command line, so it can be invoked easily using 'be web'
Diffstat (limited to 'interfaces/web/cfbe.py')
-rwxr-xr-xinterfaces/web/cfbe.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/interfaces/web/cfbe.py b/interfaces/web/cfbe.py
deleted file mode 100755
index 68c484d..0000000
--- a/interfaces/web/cfbe.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python
-
-import cherrypy
-import web
-from optparse import OptionParser
-from os import path
-
-module_dir = path.dirname(path.abspath(web.__file__))
-template_dir = path.join(module_dir, 'templates')
-
-def build_parser():
- """Builds and returns the command line option parser."""
-
- usage = 'usage: %prog bug_directory'
- parser = OptionParser(usage)
- return parser
-
-def parse_arguments():
- """Parse the command line arguments."""
-
- parser = build_parser()
- (options, args) = parser.parse_args()
-
- if len(args) != 1:
- parser.error('You need to specify a bug directory.')
-
- return { 'bug_root': args[0], }
-
-
-config = path.join(module_dir, 'cfbe.config')
-options = parse_arguments()
-
-WebInterface = web.WebInterface(path.abspath(options['bug_root']), template_dir)
-
-cherrypy.config.update({
- 'tools.encode.on': True,
- 'tools.encode.encoding': 'utf8',
- 'tools.staticdir.root': path.join(module_dir, 'static'),
- })
-app_config = { '/static': { 'tools.staticdir.on': True,
- 'tools.staticdir.dir': '', } }
-cherrypy.quickstart(WebInterface, '/', app_config)