django-hoptoad/quickstart/index.html @ 77d88e4840d3
Remove dead projects
author |
Steve Losh <steve@stevelosh.com> |
date |
Mon, 28 Mar 2016 18:01:45 +0000 |
parents |
50444dfe7265 |
children |
(none) |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<title>
django-hoptoad »
Quick Start
</title>
<link rel="stylesheet" type="text/css" href="../media/css/reset.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="../media/css/layout.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="../media/css/typography.css" media="screen, projection" />
<link rel="stylesheet" type="text/css" href="../media/css/pygments.css" media="screen, projection" />
</head>
<body >
<div id="content">
<div id="breadcrumbs">
<p>
<a href="../">index</a> »
quickstart
</p>
</div> <!-- div#breadcrumbs -->
<h1 id="quick-start">Quick Start</h1>
<p>To set up a Django project to notify Hoptoad of its errors, you need to do two things in its <code>settings.py</code> file.</p>
<p>First, add the <code>HoptoadNotifierMiddleware</code> as the last item in the <code>MIDDLEWARE_CLASSES</code> setting:</p>
<div class="codehilite"><pre><span class="n">MIDDLEWARE_CLASSES</span> <span class="o">=</span> <span class="p">(</span>
<span class="c1"># ... other middleware classes ...</span>
<span class="s">'hoptoad.middleware.HoptoadNotifierMiddleware'</span><span class="p">,</span>
<span class="p">)</span>
</pre></div>
<p>Next, you'll need to add a <code>HOPTOAD_API_KEY</code> setting. You can get the key from the Hoptoad project page.</p>
<div class="codehilite"><pre><span class="n">HOPTOAD_API_KEY</span> <span class="o">=</span> <span class="s">'Your Hoptoad API key.'</span>
</pre></div>
<p>Restart the server and you're all set! <code>django-hoptoad</code> will begin reporting errors to Hoptoad right away.</p>
<p>There are a few options that you can configure to specify exactly what errors will be reported. Take a look at the <a href="../config/">Configuration guide</a> to learn about them.</p>
<p id="footer">
django-hoptoad —
Powered by <a href="http://bitbucket.org/zacharyvoase/markdoc">Markdoc</a>.
</p>
</div> <!-- div#content -->
</body>
</html>