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
First, you need to specified SPAMINSPECTOR_AKISMET_KEY on settings.py
Add spaminspector to INSTALLED_APPS on settings.py
Add spaminspector.middleware.SpamInspectionMiddleware to MIDDLEWARE_CLASSES on settings.py
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for django-spaminspector-0.1rc3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ae65608ab81703907332b8620de0495ca11b0c8a3d5b136db7c162e91baa564 |
|
MD5 | a3a441a27e761912a69de295188b3ba9 |
|
BLAKE2b-256 | 0ab85839378d81c05a47da7e73f8085c8ef105363fe157d000785e33905b2bc6 |
Hashes for django_spaminspector-0.1rc3-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 820b72e2cc791cea056eb9bc7873729975c8079c62d0fb78cd44f3be63e9546a |
|
MD5 | dc44d337b676640ae21a719253847a6a |
|
BLAKE2b-256 | 7f693a9fbe1675b5d8a3aa98a4e8a58f8d303e32435691facf800a7eb6c16027 |
Hashes for django-spaminspector-0.1rc3.macosx-10.7-intel.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad118eb38b3ed76824583ed24760159f387e8be4b392e94df37eb5c4e3aa00b1 |
|
MD5 | bf4b6d37d881447d3a16a52ff5d9dd19 |
|
BLAKE2b-256 | 80100fd2880041ad173a8334fe9d4958d1948f5b324fdd839843e4dbbe898d01 |