Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unicode in HTML_DESCRIPTION, add email error logging #11

Merged
merged 2 commits into from
Dec 27, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions habitat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
couch_uri: "http://localhost:5984"
couch_db: habitat
log_stderr_level: DEBUG
log_file_level: NONE
log_levels:
stderr: NONE
file: NONE
email: NONE
spacenearus:
log_file:
tracker: "http://habhub.org/tracker/track.php?{0}"
transition_app:
log_file:
5 changes: 3 additions & 2 deletions habitat_transition/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from xml.sax.saxutils import escape as htmlescape
from habitat import uploader
from . import couch_to_xml
from habitat.utils.startup import load_config
from habitat.utils.startup import load_config, setup_logging

# Monkey patch float precision
json.encoder.FLOAT_REPR = lambda o: format(o, '.5f')
Expand All @@ -41,6 +41,7 @@
# N.B.: Searches working directory since it won't be specified in argv.
# Configure uwsgi appropriately.
config = load_config()
setup_logging(config, "transition_app")
couch_settings = {"couch_uri": config["couch_uri"],
"couch_db": config["couch_db"]}

Expand Down Expand Up @@ -168,7 +169,7 @@ def set_expires(response, diff):

response.headers["Expires"] = expires

HTML_DESCRIPTION = """
HTML_DESCRIPTION = u"""
<font size="-2"><BR>
<B>Radio: </B>{radio_safe}<BR>
<B>Antenna: </B>{antenna_safe}<BR>
Expand Down