Metadata-Version: 2.0
Name: django-brokenlinks
Version: 0.1.1
Summary: reusable django app to log crawlers hitting many 404 pages.
Home-page: https://github.com/wtayyeb/django-brokenlinks
Author: wtayyeb
Author-email: wtayyeb@gmail.com
License: MIT
Keywords: django brokenlinks
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Utilities
Requires-Dist: django-appconf

Django Brokenlinks
==================

log brokenlinks to logfile and config fail2ban to ban crawlers hitting many 404 pages.

Requirements
------------

`django-appconf`


Installation
------------

::

    $ pip install django-brokenlinks


Setup
-----

1. Add ``'brokenlinks'`` to INSTALLED_APPS
2. Add ``'brokenlinks.middleware.BrokenLinkEmailsMiddleware'`` to ``MIDDLEWARE_CLASSES``
3. Set the ``BROKENLINKS_LOG_PATH``
4. After change in brokenlinks configs run ``manage.py createbrokenlinksconfs`` once and use the result conf-files with fail2ban 

your settings.py will look like below:


    INSTALLED_APPS = (
        # ...
        'brokenlinks',
        # ...
    )

    MIDDLEWARE_CLASSES= (
        'brokenlinks.middleware.BrokenLinkEmailsMiddleware',
        # ...
    )

    BROKENLINKS_LOG_PATH = '/path/to/brokenlinks.log'


then config fail2ban to use it


Author
-----

* w.Tayyeb

