--- a/pvl/web/application.py Mon Jan 13 20:25:36 2014 +0200
+++ b/pvl/web/application.py Mon Jan 13 21:14:30 2014 +0200
@@ -89,6 +89,8 @@
#"/static/....js"
)
+ STATUS = 200
+
def __init__ (self, app, request, urls, params) :
"""
app - wsgi.Application
@@ -120,6 +122,13 @@
return self.urls.build(handler, params)
+ def status (self) :
+ """
+ Return HTTP status code for response.
+ """
+
+ return self.STATUS
+
def title (self) :
"""
Render site/page title as text.
@@ -204,7 +213,9 @@
# XXX: might also be string?
text = unicode(self.render_html())
- return pvl.web.response.html(text)
+ return pvl.web.response.html(text,
+ status = self.status(),
+ )
def cleanup (self) :
"""