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
Serve files with Django.

django-downloadview django-downloadview makes it easy to serve files with Django: you manage files with Django (permissions, filters, generation, ...)

Jazzband 328 Dec 07, 2022
mirage ~ ♪ extended django admin or manage.py command.

mirage ~ ♪ extended django admin or manage.py command. ⬇️ Installation Installing Mirage with Pipenv is recommended. pipenv install -d mirage-django-l

Shota Shimazu 6 Feb 14, 2022
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Dec 31, 2022
Sistema de tratamento e análise de grandes volumes de dados através de técnicas de Data Science

Sistema de tratamento e análise de grandes volumes de dados através de técnicas de data science Todos os scripts, gráficos e relatórios de todas as at

Arthur Quintanilha Neto 1 Sep 05, 2022
Developer-friendly asynchrony for Django

Django Channels Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Djan

Django 5.5k Dec 29, 2022
An API was build with Django to store and retrieve information about various musical instruments.

The project is meant to be a starting point, an experimentation or a basic example of a way to develop an API with Django. It is an exercise on using Django and various python technologies and design

Kostas Ziovas 2 Dec 25, 2021
Djang Referral System

Djang Referral System About | Features | Technologies | Requirements | Starting | License | Author 🎯 About I created django referral system and I wan

Alex Kotov 5 Oct 25, 2022
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 07, 2023
This is a repository for collecting global custom management extensions for the Django Framework.

Django Extensions Django Extensions is a collection of custom extensions for the Django Framework. Getting Started The easiest way to figure out what

Django Extensions 6k Dec 26, 2022
Django-shared-app-isolated-databases-example - Django - Shared App & Isolated Databases

Django - Shared App & Isolated Databases An app that demonstrates the implementa

Ajai Danial 5 Jun 27, 2022
An example of Django project with basic user functionality and account activation.

Simple Django Login and Registration An example of Django project with basic user functionality. Screenshots Log In Create an account Authorized page

Hussein Sarea 3 Oct 19, 2022
Yummy Django API, it's the exclusive API used for the e-yummy-ke vue web app

Yummy Django API, it's the exclusive API used for the e-yummy-ke vue web app

Am.Chris_KE 1 Feb 14, 2022
A generic system for filtering Django QuerySets based on user selections

Django Filter Django-filter is a reusable Django application allowing users to declaratively add dynamic QuerySet filtering from URL parameters. Full

Carlton Gibson 3.9k Jan 03, 2023
xsendfile etc wrapper

Django Sendfile This is a wrapper around web-server specific methods for sending files to web clients. This is useful when Django needs to check permi

John Montgomery 476 Dec 01, 2022
E-Commerce Platform

Shuup Shuup is an Open Source E-Commerce Platform based on Django and Python. https://shuup.com/ Copyright Copyright (c) 2012-2021 by Shuup Commerce I

Shuup 2k Jan 07, 2023
A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel

Features Python 2.7, 3.4, Django 2.0+ support (Django 1.11 (LTS), is supported until django-autocomplete-light-3.2.10), Django (multiple) choice suppo

YourLabs 1.7k Jan 01, 2023
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
Vehicle registration using Python, Django and SQlite3

PythonCrud Cadastro de veículos utilizando Python, Django e SQlite3 Para acessar o deploy no Heroku:

Jorge Thiago 4 May 20, 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 09, 2022
System checks for your project's environment.

django-version-checks System checks for your project's environment. Requirements Python 3.6 to 3.9 supported. Django 2.2 to 3.2 supported. Are your te

Adam Johnson 33 Dec 22, 2022