Django Simple Spam Blocker is blocking spam by regular expression.

Overview

Django Simple Spam Blocker

https://secure.travis-ci.org/moqada/django-simple-spam-blocker.png?branch=master

Django Simple Spam Blocker is blocking spam by regular expression.

Filtering the following matters.

  • Author
  • Content
  • Email
  • IP
  • Referer
  • URL
  • UserAgent

And you can edit regular expression, on Django's admin site.

Installation

  1. Add the simplespamblocker directory to your Python path.

  2. Add simplespamblocker to your INSTALLED_APPS.:

    INSTALLED_APPS = (
        # ...
        'simplespamblocker',
        # ...
    )
    
  3. Add the following middleware to your MIDDLEWARE_CLASSES.:

    MIDDLEWARE_CLASSES = (
        # ...
        'simplespamblocker.middleware.SpamBlockMiddleware',
        # ...
    )
    
  4. Add path which you wanto to block spam to SIMPLESPAMBLOCKER_PROFILES on settings.py.:

    SIMPLESPAMBLOCKER_PROFILES = (
        # Sample for django's comment framework
        (r'^/comments/post/$', {
            'method': 'post',
            'author': lambda request: request.POST.get('name', ''),
            'email': lambda request: request.POST.get('email', ''),
            'url': lambda request: request.POST.get('url', ''),
            'content': lambda request: request.POST.get('comment', ''),
        }),
    )
    
  5. Run syncdb.:

    $ python manage.py syncdb
    

    Note: When your project use South, run the following command.:

    $ python manage.py migrate simplespamblocker
    
  6. Run your server, visit admin site and edit regular expression of Option model.

Settings

SIMPLESPAMBLOCKER_PROFILES
The list of tuple -- regular expression of path and block profile --.
SIMPLESPAMBLOCKER_SPAM_TEMPLATE

A path of template file which is rendering after blocking spam This key is generated per Option model.

default: 'simplespamblocker/option/ '

SIMPLESPAMBLOCKER_LOGGER_NAME
Python's builtin logger name. This logger logs at blocking spam. Default value is None. (inactive)

Others

This project is Inspired by django-spaminspector.

You might also like...
django-quill-editor makes Quill.js easy to use on Django Forms and admin sites
django-quill-editor makes Quill.js easy to use on Django Forms and admin sites

django-quill-editor django-quill-editor makes Quill.js easy to use on Django Forms and admin sites No configuration required for static files! The ent

A Django chatbot that is capable of doing math and searching Chinese poet online. Developed with django, channels, celery and redis.

Django Channels Websocket Chatbot A Django chatbot that is capable of doing math and searching Chinese poet online. Developed with django, channels, c

A handy tool for generating Django-based backend projects without coding. On the other hand, it is a code generator of the Django framework.
A handy tool for generating Django-based backend projects without coding. On the other hand, it is a code generator of the Django framework.

Django Sage Painless The django-sage-painless is a valuable package based on Django Web Framework & Django Rest Framework for high-level and rapid web

A beginner django project and also my first Django project which involves shortening of a longer URL into a short one using a unique id.

Django-URL-Shortener A beginner django project and also my first Django project which involves shortening of a longer URL into a short one using a uni

Dockerizing Django with Postgres, Gunicorn, Nginx and Certbot. A fully Django starter project.

Dockerizing Django with Postgres, Gunicorn, Nginx and Certbot 🚀 Features A Django stater project with fully basic requirements for a production-ready

pytest-django allows you to test your Django project/applications with the pytest testing tool.

pytest-django allows you to test your Django project/applications with the pytest testing tool.

APIs for a Chat app. Written with Django Rest framework and Django channels.
APIs for a Chat app. Written with Django Rest framework and Django channels.

ChatAPI APIs for a Chat app. Written with Django Rest framework and Django channels. The documentation for the http end points can be found here This

django-dashing is a customisable, modular dashboard application framework for Django to visualize interesting data about your project. Inspired in the dashboard framework Dashing
django-dashing is a customisable, modular dashboard application framework for Django to visualize interesting data about your project. Inspired in the dashboard framework Dashing

django-dashing django-dashing is a customisable, modular dashboard application framework for Django to visualize interesting data about your project.

Django-MySQL extends Django's built-in MySQL and MariaDB support their specific features not available on other databases.
Django-MySQL extends Django's built-in MySQL and MariaDB support their specific features not available on other databases.

Django-MySQL The dolphin-pony - proof that cute + cute = double cute. Django-MySQL extends Django's built-in MySQL and MariaDB support their specific

Comments
  • docs: fix simple typo, comaptible -> compatible

    docs: fix simple typo, comaptible -> compatible

    There is a small typo in simplespamblocker/tests/middleware.py.

    Should read compatible rather than comaptible.

    Semi-automated pull request generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

    opened by timgates42 0
Owner
Masahiko Okada
👴🏻 🙅🏻
Masahiko Okada
Twitter Bootstrap for Django Form - A simple Django template tag to work with Bootstrap

Twitter Bootstrap for Django Form - A simple Django template tag to work with Bootstrap

tzangms 557 Oct 19, 2022
Django-static-site - A simple content site framework that harnesses the power of Django without the hassle

coltrane A simple content site framework that harnesses the power of Django with

Adam Hill 57 Dec 6, 2022
Django Starter is a simple Skeleton to start with a Django project.

Django Starter Template Description Django Starter is a simple Skeleton to start

Numan Ibn Mazid 1 Jan 10, 2022
Django-Text-to-HTML-converter - The simple Text to HTML Converter using Django framework

Django-Text-to-HTML-converter This is the simple Text to HTML Converter using Dj

Nikit Singh Kanyal 6 Oct 9, 2022
Meta package to combine turbo-django and stimulus-django

Hotwire + Django This repository aims to help you integrate Hotwire with Django ?? Inspiration might be taken from @hotwired/hotwire-rails. We are sti

Hotwire for Django 31 Aug 9, 2022
django-reversion is an extension to the Django web framework that provides version control for model instances.

django-reversion django-reversion is an extension to the Django web framework that provides version control for model instances. Requirements Python 3

Dave Hall 2.8k Jan 2, 2023
Django-environ allows you to utilize 12factor inspired environment variables to configure your Django application.

Django-environ django-environ allows you to use Twelve-factor methodology to configure your Django application with environment variables. import envi

Daniele Faraglia 2.7k Jan 7, 2023
Rosetta is a Django application that eases the translation process of your Django projects

Rosetta Rosetta is a Django application that facilitates the translation process of your Django projects. Because it doesn't export any models, Rosett

Marco Bonetti 909 Dec 26, 2022
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

Cookiecutter Django Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. Documentati

Daniel Feldroy 10k Dec 31, 2022
Django project starter on steroids: quickly create a Django app AND generate source code for data models + REST/GraphQL APIs (the generated code is auto-linted and has 100% test coverage).

Create Django App ?? We're a Django project starter on steroids! One-line command to create a Django app with all the dependencies auto-installed AND

imagine.ai 68 Oct 19, 2022