aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Losh <steve@stevelosh.com>2009-02-07 12:17:22 -0500
committerSteve Losh <steve@stevelosh.com>2009-02-07 12:17:22 -0500
commit7b703174d6e48f81683c51bf5b56c25b464b631b (patch)
tree16c7c7e46d2f41a4693acaf6db6e68f9a540bffb
parentd29f2c497b61e39408cbad015a2f27307021cb75 (diff)
downloadbugseverywhere-7b703174d6e48f81683c51bf5b56c25b464b631b.tar.gz
Testing out some packaging issues.
-rwxr-xr-xcfbe.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/cfbe.py b/cfbe.py
index f594f2b..0a21899 100755
--- a/cfbe.py
+++ b/cfbe.py
@@ -5,14 +5,16 @@ from libbe import bugdir
from jinja2 import Environment, FileSystemLoader
from datetime import datetime
from optparse import OptionParser
+from os import path
+module_directory = path.dirname(path.abspath(__file__))
def datetimeformat(value, format='%B %d, %Y at %I:%M %p'):
"""Takes a timestamp and revormats it into a human-readable string."""
return datetime.fromtimestamp(value).strftime(format)
-template_root = '/Users/sjl/Documents/cherryflavoredbugseverywhere/templates'
+template_root = path.join(module_directory, 'templates')
env = Environment(loader=FileSystemLoader(template_root))
env.filters['datetimeformat'] = datetimeformat
@@ -170,6 +172,7 @@ def parse_arguments():
return { 'bug_root': args[0], }
-config = '/Users/sjl/Documents/cherryflavoredbugseverywhere/cfbe.config'
+config = path.join(module_directory, 'cfbe.config')
options = parse_arguments()
-cherrypy.quickstart(WebInterface(options['bug_root']), '/', config)
+#cherrypy.quickstart(WebInterface(options['bug_root']), '/', config)
+print module_directory \ No newline at end of file