# HG changeset patch # User Steve Losh # Date 1267287248 18000 # Node ID 50444dfe726588de206eeae25040761b6ae5f78f # Parent 319926dba84235035df81696065e1cd834cef2aa django-hoptoad: Update documentation. diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/config/index.html --- a/django-hoptoad/config/index.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/config/index.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,44 +8,67 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » Configuration - - - - - - - - -
- + + + - + + django-hoptoad » + Configuration + + + + + + + + + -

Configuration

+ + + + + + + + + + + +
+ + + + + + + + + +

Configuration

There are a few extra things you can configure if you'd like to tweak the notification process a bit.

+

Specify an Environment Name

+

If your application is deployed in multiple places, an environment name distinguishes production servers from QA or staging servers, so you know which server the error was produced on. Hoptoad's API seems to accept any environment name, but typical examples would be 'Production', 'QA', 'Test', 'Development'. If you have one settings.py per environment, you can set this quite simply:

+
HOPTOAD_ENV_NAME = 'Production'
+
+ + +

If you have a single settings.py shared between environments, you may want to set this in a more dynamic fashion. There's no limit (other than Python itself) on how to do this. For example:

+
HOPTOAD_ENV_NAME = 'Test' if DEBUG else 'Production'
+
+ + +

Or:

+
import platform
+HOPTOAD_ENV_NAME = platform.node()
+
+ + +

If HOPTOAD_ENV_NAME is not set, the Middleware by default will send the environment name as 'Unknown'.

Specify a Default Timeout

By default, the amount of time the notifier will wait before giving up on contacting Hoptoad is Python's "global default timeout setting". I have no idea what that is because the documentation does not see fit to explain that to me.

If you'd like to change that amount you can use the HOPTOAD_TIMEOUT setting. You must be running Python 2.6+ to use this.

@@ -210,15 +251,20 @@

Problems?

If you're having trouble you might want to take a look at the Troubleshooting Guide.

- - - - Powered by Markdoc. -

+
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/config/list.html --- a/django-hoptoad/config/list.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/config/list.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,42 +8,65 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls /config - - - - - - - - -
- + + + - + + django-hoptoad » + ls /config + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /config

@@ -52,14 +75,20 @@ - - + + +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/index.html --- a/django-hoptoad/index.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/index.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,50 +8,77 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » django-hoptoad - - - - - - - - -
- + + + - + + django-hoptoad » + django-hoptoad + + + + + + + + + -

django-hoptoad

+ + + + + + + + + + + +
+ + + + + + + + + +

django-hoptoad

django-hoptoad is some simple Middleware for letting Django-driven websites report their errors to Hoptoad. Now ponies can ride the toad too.

Installation

Quick Start

Configuration

Troubleshooting

Code

- - - - Powered by Markdoc. -

+
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/installation/index.html --- a/django-hoptoad/installation/index.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/installation/index.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,39 +8,61 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » Installation - - - - - - - - -
- + + + - + + django-hoptoad » + Installation + + + + + + + + + -

Installation

+ + + + + + + + + + + +
+ + + + + + + + + +

Installation

django-hoptoad requires:

  • Python 2.5+ (preferably 2.6+ as that's what I've tested it with)
  • @@ -75,15 +97,20 @@

    Take a look at the Quick Start guide to learn how to report your Django project's errors to Hoptoad.

    - - - - Powered by Markdoc. -

    +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/installation/list.html --- a/django-hoptoad/installation/list.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/installation/list.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,42 +8,65 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls /installation - - - - - - - - -
- + + + - + + django-hoptoad » + ls /installation + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /installation

@@ -52,14 +75,20 @@ - - + + +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/list.html --- a/django-hoptoad/list.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/list.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,38 +8,61 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls / - - - - - - - - -
- + + + - + + django-hoptoad » + ls / + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /

@@ -94,14 +117,20 @@ - - + + +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/media/css/index.html --- a/django-hoptoad/media/css/index.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/media/css/index.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,46 +8,69 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls /media/css - - - - - - - - -
- + + + - + + django-hoptoad » + ls /media/css + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /media/css

@@ -98,14 +121,20 @@ - - + + +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/media/css/list.html --- a/django-hoptoad/media/css/list.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/media/css/list.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,46 +8,69 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls /media/css - - - - - - - - -
- + + + - + + django-hoptoad » + ls /media/css + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /media/css

@@ -98,14 +121,20 @@ - - + + +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/media/index.html --- a/django-hoptoad/media/index.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/media/index.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,42 +8,65 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls /media - - - - - - - - -
- + + + - + + django-hoptoad » + ls /media + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /media

@@ -66,14 +89,20 @@ - - + + +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/media/list.html --- a/django-hoptoad/media/list.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/media/list.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,42 +8,65 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls /media - - - - - - - - -
- + + + - + + django-hoptoad » + ls /media + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /media

@@ -66,14 +89,20 @@ - - + + +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/quickstart/index.html --- a/django-hoptoad/quickstart/index.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/quickstart/index.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,39 +8,61 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » Quick Start - - - - - - - - -
- + + + - + + django-hoptoad » + Quick Start + + + + + + + + + -

Quick Start

+ + + + + + + + + + + +
+ + + + + + + + + +

Quick Start

To set up a Django project to notify Hoptoad of its errors, you need to do two things in its settings.py file.

First, add the HoptoadNotifierMiddleware as the last item in the MIDDLEWARE_CLASSES setting:

MIDDLEWARE_CLASSES = (
@@ -57,15 +79,20 @@
 
 

Restart the server and you're all set! django-hoptoad will begin reporting errors to Hoptoad right away.

There are a few options that you can configure to specify exactly what errors will be reported. Take a look at the Configuration guide to learn about them.

- - - - Powered by Markdoc. -

+
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/quickstart/list.html --- a/django-hoptoad/quickstart/list.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/quickstart/list.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,42 +8,65 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls /quickstart - - - - - - - - -
- + + + - + + django-hoptoad » + ls /quickstart + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /quickstart

@@ -52,14 +75,20 @@ - - + + +
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/troubleshooting/index.html --- a/django-hoptoad/troubleshooting/index.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/troubleshooting/index.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,39 +8,61 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » Troubleshooting - - - - - - - - -
- + + + - + + django-hoptoad » + Troubleshooting + + + + + + + + + -

Troubleshooting

+ + + + + + + + + + + +
+ + + + + + + + + +

Troubleshooting

If things don't go smoothly, the first thing to do is run the tests to see if they can determine what's wrong. To enable the tests you'll need to add django-hoptoad to your INSTALLED_APPS setting:

INSTALLED_APPS = (
     # ... other apps ...
@@ -56,15 +78,20 @@
 
 
 

NOTE: The unit tests are very simple at the moment. I'm working on more, but please feel free to submit ideas (or better yet: patches).

- - - - Powered by Markdoc. -

+
-
+ + + + \ No newline at end of file diff -r 319926dba842 -r 50444dfe7265 django-hoptoad/troubleshooting/list.html --- a/django-hoptoad/troubleshooting/list.html Fri Jan 29 20:05:43 2010 -0500 +++ b/django-hoptoad/troubleshooting/list.html Sat Feb 27 11:14:08 2010 -0500 @@ -8,42 +8,65 @@ xmlns:foaf="http://xmlns.com/foaf/0.1/"> - - - django-hoptoad » ls /troubleshooting - - - - - - - - -
- + + + - + + django-hoptoad » + ls /troubleshooting + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +

ls /troubleshooting

@@ -52,14 +75,20 @@ - - + + +
-
+ + + + \ No newline at end of file