aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2012-11-26 07:48:21 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2012-11-26 07:48:21 +0100
commit39f7e40b7ac81011c4d9bee1d859c664c6189d92 (patch)
tree3a302b6b248a4de13bcc78697de22c2dd833e088
parentUpdated README and the REST documentation (requirements section). (diff)
downloadnewspipe-39f7e40b7ac81011c4d9bee1d859c664c6189d92.tar.gz
newspipe-39f7e40b7ac81011c4d9bee1d859c664c6189d92.tar.bz2
newspipe-39f7e40b7ac81011c4d9bee1d859c664c6189d92.zip
Template for the /error_page page.
-rwxr-xr-xsource/pyAggr3g470r.py9
-rw-r--r--source/templates/error.html7
2 files changed, 9 insertions, 7 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index a7f12de8..8508615e 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -792,12 +792,8 @@ class pyAggr3g470r(object):
"""
Display a message (bad feed id, bad article id, etc.)
"""
- html = htmlheader()
- html += htmlnav
- html += """<div class="left inner">"""
- html += """%s""" % message
- html += "\n<hr />\n" + htmlfooter
- return html
+ tmpl = lookup.get_template("error.html")
+ return tmpl.render(message=message)
error_page.exposed = True
@@ -842,7 +838,6 @@ class pyAggr3g470r(object):
action, feed_id = param.split(':')
except:
return self.error_page("Bad URL. This feed do not exists.")
-
return self.index()
mail_notification.exposed = True
diff --git a/source/templates/error.html b/source/templates/error.html
new file mode 100644
index 00000000..5bce304b
--- /dev/null
+++ b/source/templates/error.html
@@ -0,0 +1,7 @@
+## error.html
+<%inherit file="base.html"/>
+<h1><div class="right innerlogo"><a href="/"><img src="/img/tuxrss.png" title="What's new today?"/></a>
+</div><a name="top"><a href="/">pyAggr3g470r - News aggregator</a></a></h1>
+<a href="http://bitbucket.org/cedricbonhomme/pyaggr3g470r/" rel="noreferrer" target="_blank">pyAggr3g470r (source code)</a>
+<div class="left inner">
+${message} \ No newline at end of file
bgstack15