Skip to main content

django-spaminspector is a generic spam inspector of Django via Akismet

Project description

Django’s genetic spam inspector library via Akismet

Install

sudo pip install django-spaminspector

or

sudo pip install git+git://github.com/lambdalisue/django-spaminspector.git#egg=django-spaminspector

How to Use

  1. First, you need to specified SPAMINSPECTOR_AKISMET_KEY on settings.py

  2. Add spaminspector to INSTALLED_APPS on settings.py

  3. Add spaminspector.middleware.SpamInspectionMiddleware to MIDDLEWARE_CLASSES on settings.py

  4. Add view which you want to inspect to SPAMINSPECTOR_VIEWS The code below is a profile for django’s comment framework:

    SPAMINSPECTOR_VIEWS = (
        ('django.contrib.comments.views.comments.post_comment', {
            'comment_type': 'comment',
            'comment_author': lambda request: request.POST.get('name', ""),
            'comment_author_email': lambda request: request.POST.get('email', ""),
            'comment_author_url': lambda request: request.POST.get('url', ""),
            'comment_contents': lambda request: request.POST.get('comment', ""),
        }),
    )

Settings

SPAMINSPECTOR_VIEWS

the list of view and inspection_profile. default settings is for django comment framework.

SPAMINSPECTOR_AKISMET_KEY

the api key of Akismet of your url.

SPAMINSPECTOR_SPAM_TEMPLATE

an template uri. this template is used to show when comment is detected as spam. (optional)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-spaminspector-0.1rc3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distributions

django_spaminspector-0.1rc3-py2.7.egg (6.7 kB view details)

Uploaded Source

File details

Details for the file django-spaminspector-0.1rc3.tar.gz.

File metadata

File hashes

Hashes for django-spaminspector-0.1rc3.tar.gz
Algorithm Hash digest
SHA256 3ae65608ab81703907332b8620de0495ca11b0c8a3d5b136db7c162e91baa564
MD5 a3a441a27e761912a69de295188b3ba9
BLAKE2b-256 0ab85839378d81c05a47da7e73f8085c8ef105363fe157d000785e33905b2bc6

See more details on using hashes here.

File details

Details for the file django_spaminspector-0.1rc3-py2.7.egg.

File metadata

File hashes

Hashes for django_spaminspector-0.1rc3-py2.7.egg
Algorithm Hash digest
SHA256 820b72e2cc791cea056eb9bc7873729975c8079c62d0fb78cd44f3be63e9546a
MD5 dc44d337b676640ae21a719253847a6a
BLAKE2b-256 7f693a9fbe1675b5d8a3aa98a4e8a58f8d303e32435691facf800a7eb6c16027

See more details on using hashes here.

File details

Details for the file django-spaminspector-0.1rc3.macosx-10.7-intel.tar.gz.

File metadata

File hashes

Hashes for django-spaminspector-0.1rc3.macosx-10.7-intel.tar.gz
Algorithm Hash digest
SHA256 ad118eb38b3ed76824583ed24760159f387e8be4b392e94df37eb5c4e3aa00b1
MD5 bf4b6d37d881447d3a16a52ff5d9dd19
BLAKE2b-256 80100fd2880041ad173a8334fe9d4958d1948f5b324fdd839843e4dbbe898d01

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page