django-spaminspector 0.1rc4
django-spaminspector is a generic spam inspector of Django via Akismet
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)
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-spaminspector-0.1rc4.tar.gz (md5) | Source | 2011-07-22 | 7KB | 254 | |
| django_spaminspector-0.1rc4-py2.7.egg (md5) | Python Egg | 2.7 | 2011-07-22 | 6KB | 257 |
- Author: Alisue
- Home Page: https://github.com/lambdalisue/django-spaminspector
- Download URL: https://github.com/lambdalisue/django-spaminspector/tarball/master
- Keywords: django generic spam inspector filtering akismet
- License: BSD
- Categories
- Package Index Owner: lambdalisue
- DOAP record: django-spaminspector-0.1rc4.xml
