Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network_webui/app.py
diff options
context:
space:
mode:
authorYour Name <you@example.com>2013-07-28 01:03:41 (GMT)
committer Your Name <you@example.com>2013-07-28 01:03:41 (GMT)
commit6a9181f269714eeb0b20ec583ac682b0980c5e9a (patch)
treeb1344c2144e303659267aabb95018623471a6669 /sugar_network_webui/app.py
parentfbf1e134ffe9cf9e01b4116fca86e7a882d0cfd4 (diff)
parent8023867fade947f7a8eac06d0354c5ceff9f7c2d (diff)
Merge branch 'master' of git://git.sugarlabs.org/network/webui
Diffstat (limited to 'sugar_network_webui/app.py')
-rw-r--r--sugar_network_webui/app.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sugar_network_webui/app.py b/sugar_network_webui/app.py
index 1b07af6..93e6d6d 100644
--- a/sugar_network_webui/app.py
+++ b/sugar_network_webui/app.py
@@ -70,7 +70,7 @@ def event_stream():
@babel.localeselector
def get_locale():
global WWW
- if 'localhost' in request.host:
+ if ('localhost' in request.host) or ('127.0.0.1' in request.host):
# we're probably embedded, get locale from env
lang = locale.getdefaultlocale()[0].split('_')[0]
logging.debug('Locale from env: %s' % lang)
@@ -337,8 +337,8 @@ def artifact_copy(guid):
f.write(blob.read())
title = _('Artifact has been downloaded.')
body = _('Success!\n\n'
- 'File %s has been copied to your Documents folder.\n'
- 'You can access it from the Journal.' % filename)
+ 'File %(filename)s has been copied to your Documents folder.\n'
+ 'You can access it from the Journal.' , filename=filename)
return render_template('dialog.html', title=title, body=body)
@@ -593,7 +593,7 @@ def del_comment(resource_guid):
return "true"
@app.route('/_artifacts/<resource_guid>', methods=['DELETE'])
-def del_comment(resource_guid):
+def del_artifact(resource_guid):
g.client.Artifact.delete(resource_guid)
return "true"
@@ -833,7 +833,7 @@ def edit_resource():
@app.route('/submit_resource', methods=['POST'])
-def new_resource():
+def submit_resource():
for r_type in ('question', 'idea', 'problem'):
if request.form.get(r_type, None):