Skip to content

Commit

Permalink
added error page
Browse files Browse the repository at this point in the history
  • Loading branch information
nod committed Sep 4, 2012
1 parent 825b559 commit 6aba047
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
25 changes: 25 additions & 0 deletions app/templates/error.html
@@ -0,0 +1,25 @@
{% extends base.html %}

{% block main %}

<div class="row">

<div class="span8 offset2 alert alert-error">

<h1> bummer. </h1>
<p>
Something melted.
</p>
<p>
About 100% of the time, the issue is with Netflix's gateway timing out as we
talk to them. Please retry soon.
</p>

<dl>
<dt>nerd details</dt>
<dd> {{ errstr }} </dd>
</dl>

</div>

{% end %}
8 changes: 7 additions & 1 deletion app/templates/index.html
Expand Up @@ -5,7 +5,13 @@
<div class="span10 offset2">

<div class="hero-unit">
<h1> GreenEggs <small> scramble your netflix queue </small> </h1>

<h1> GreenEggs </h1>

<p>
Scramble your netflix queue.
</p>

</div>

<a href="/auth/netflix/connect" class="btn btn-large btn-danger"> login with your netflix account </a>
Expand Down
4 changes: 4 additions & 0 deletions app/views/base.py
Expand Up @@ -35,3 +35,7 @@ def _handle_request_exception(self, e):
if self.settings.get('debug_pdb') and not isinstance(e, socket.error):
import pdb
pdb.post_mortem()

def write_error(self, status_code, **kwargs):
print "ERROR", status_code, kwargs
self.render('error.html', errstr=str(kwargs))

0 comments on commit 6aba047

Please sign in to comment.