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.

Owner
Masahiko Okada
👴🏻 🙅🏻
Masahiko Okada
A ToDO Rest API using Django, PostgreSQL and Docker

This Rest API uses PostgreSQL, Docker and Django to implements a ToDo application.

Brenno Lima dos Santos 2 Jan 05, 2022
Hello world written in Django.

Learning Django 💡 create a virtual environment create python -m venv ./venv. this virtualenv file will be excluded by .gitignore activate the virtual

Dipak giri 4 Nov 26, 2021
A simple REST API to manage postal addresses, written in Python/Django.

A simple REST API to manage postal addresses, written in Python/Django.

Attila Bagossy 2 Feb 14, 2022
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.

talPor Solutions 703 Dec 22, 2022
A Django/Python web app that functions as a digital diary

My Django Diary Full-stack web application that functions as a digital diary using Django, Python, SQLite, HTML & CSS. Things I learned during this pr

1 Sep 30, 2022
This is a repository for a web application developed with Django, built with Crowdbotics

assignment_32558 This is a repository for a web application developed with Django, built with Crowdbotics Table of Contents Project Structure Features

Crowdbotics 1 Dec 29, 2021
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

10.1k Jan 08, 2023
An insecure login and registration website with Django.

An insecure login and registration website with Django.

Luis Quiñones Requelme 1 Dec 05, 2021
This website serves as an online database (hosted via SQLLite) for fictional businesses in the area to store contact information (name, email, phone number, etc.) for fictional customers.

Django-Online-Business-Database-Project this project is still in progress Overview of Website This website serves as an online database (hosted via SQ

1 Oct 30, 2021
Add Chart.js visualizations to your Django admin using a mixin class

django-admincharts Add Chart.js visualizations to your Django admin using a mixin class. Example from django.contrib import admin from .models import

Dropseed 22 Nov 22, 2022
A django model and form field for normalised phone numbers using python-phonenumbers

django-phonenumber-field A Django library which interfaces with python-phonenumbers to validate, pretty print and convert phone numbers. python-phonen

Stefan Foulis 1.3k Dec 31, 2022
Django Audit is a simple Django app that tracks and logs requests to your application.

django-audit Django Audit is a simple Django app that tracks and logs requests to your application. Quick Start Install django-audit pip install dj-au

Oluwafemi Tairu 6 Dec 01, 2022
Fully reponsive Chat Application built with django, javascript, materialUi, bootstrap4, html and css.

Chat app (Full Stack Frameworks with Django Project) Fully reponsive Chat Application built with django, javascript, materialUi, bootstrap4, html and

1 Jan 19, 2022
Django StatusPage - App to display statuspage for your services

Django StatusPage - App to display statuspage for your services

Gorlik 1 Oct 27, 2021
Easy thumbnails for Django

Easy Thumbnails A powerful, yet easy to implement thumbnailing application for Django 1.11+ Below is a quick summary of usage. For more comprehensive

Chris Beaven 1.3k Dec 30, 2022
Transparently use webpack with django

Looking for maintainers This repository is unmaintained as I don't have any free time to dedicate to this effort. If you or your organisation are heav

Owais Lone 2.4k Jan 06, 2023
REST API with Django and SQLite3

REST API with Django and SQLite3

Luis Quiñones Requelme 1 Nov 07, 2021
Automated image processing for Django. Currently v4.0

ImageKit is a Django app for processing images. Need a thumbnail? A black-and-white version of a user-uploaded image? ImageKit will make them for you.

Matthew Dapena-Tretter 2.1k Jan 04, 2023
Django REST Client API

Django REST Client API Client data provider API.

Ulysses Monteiro 1 Nov 08, 2021
Django model mixins and utilities.

django-model-utils Django model mixins and utilities. django-model-utils supports Django 2.2+. This app is available on PyPI. Getting Help Documentati

Jazzband 2.4k Jan 04, 2023