Commits

Anonymous committed 1c4fe03

Updated documentation and fixed an initialization bug

Comments (0)

Files changed (5)

 *.swp
 *.swo
 .DS_Store
+.git*
 
 django-hoptoad requires:
 
-* Python_ 2.5+ (preferably 2.6+ as that's what I've tested it with)
-* PyYAML_ (`pip install pyyaml` or `easy_install pyyaml`)
+* Python_ 2.6
 * Django_ 1.0+
 * A Hoptoad_ account
 
 .. _Python: http://python.org/
-.. _PyYAML: http://pyyaml.org/
 
 
 Installation
     HOPTOAD_API_KEY = 'Your Hoptoad API key.'
 
 
+Advanced-Usage
+--------------
+
+There are more advanced options that can be used to customize your Hoptoad_ application::
+
+    - HOPTOAD_NOTIFY_WHILE_DEBUG
+
+    - HOPTOAD_NOTIFY_403
+
+    - HOPTOAD_NOTIFY_404
+
+    - HOPTOAD_IGNORE_AGENTS
+
+    - HOPTOAD_HANDLER
+
+    - HOPTOAD_TIMEOUT
+
+    - HOPTOAD_NOTIFICATION_URL
+
+    - HOPTOAD_THREAD_COUNT
+
+If you feel that you might be cluttering your settings.py with all these ``HOPTOAD_*`` settings, you can conveniently group them in a dictionary::
+
+    - HOPTOAD_SETTINGS 
+
+
 Documentation
 -------------
 

hoptoad/__init__.py

 from django.conf import settings
+from itertools import ifilter
 
 
 __version__ = 0.3
         # settings in a dictionary
         hoptoad_settings = {}
         # for every attribute that starts with hoptoad
-        for attr in itertools.ifilter(lambda x: x.startswith('HOPTOAD'),
-                                      dir(settings)):
+        for attr in ifilter(lambda x: x.startswith('HOPTOAD'), dir(settings)):
             hoptoad_settings[attr] = getattr(settings, attr)
 
         if not hoptoad_settings:

hoptoad/middleware.py

         self.handler = get_handler()
 
     def _ignore(self, request):
-        """Return True if the given request should be ignored, False otherwise."""
+        """Return True if the given request should be ignored,
+        False otherwise.
+
+        """
         ua = request.META.get('HTTP_USER_AGENT', '')
         return any(i.search(ua) for i in self.ignore_agents)
 
     version='0.3',
     description='django-hoptoad is some simple Middleware for letting Django-driven websites report their errors to Hoptoad.',
     long_description=open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst')).read(),
-    author='Steve Losh',
-    author_email='steve@stevelosh.com',
+    author='Steve Losh, Mahmoud Abdelkader',
+    author_email='steve@stevelosh.com, mahmoud@linux.com',
     url='http://stevelosh.com/projects/django-hoptoad/',
     packages=find_packages(),
-    install_requires=['pyyaml'],
     classifiers=[
         'Development Status :: 4 - Beta',
         'Environment :: Web Environment',