{ "info": { "author": "Fabien Schwebel", "author_email": "fabien@schwebel.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "# django-misery\n\n## Overview\n\nA simple ban system for Django, that does nasty stuff to trolls wandering on your website.\n\nUsers banned the classical way are encouraged to bypass the ban by creating another account or changing their IP address.\nA nastier and probably more effective way to do it is to use what is known as slowban, and errorban. This Django middleware implements those.\n\n### Features\n\n* slowing page generation for miserable users\n* logging them out randomly\n* send a 404 from time to time...\n* ... or a 403...\n* ... or even a blank page if you want\n* last but not least, a wonderful ASP.NET error page made just for them\n\nHey, they deserved it!\n\n### Pros:\n\n* lightweight, designed not to slow down your website a single bit (from a non-miserable point of view, of course)\n* supports both IPv4 and IPv6\n\n### Cons:\n\n* doesn't currently support masks. Yes, it can be handy against users having a botnet under their control or in case of a user having an IPv6 range, but the current implementation favors speed over features.\n\n## Installation & configuration\n\nTo install the app, you can use PIP: `pip install django-misery`; then add `django_misery` to your INSTALLED_APPS setting, and `django_misery.middleware.miserize` to your MIDDLEWARE_CLASSES.\n\nThe following settings can be personnalized:\n\n* `MISERY_SLOW_STRENGTH`: seconds that miserable users will have to wait _at least_ (maximum twice longer) (default: 6)\n* `MISERY_LOGOUT_PROBABILITY`: **percentage** of probability a user will be disconnected (default: 10)\n* `MISERY_403_PROBABILITY`: same for 403 (default: 10)\n* `MISERY_404_PROBABILITY`: I'm gonna let you guess for this one (default: 10)\n* `MISERY_WHITE_SCREEN_PROBABILITY`: same for a nice, 100% pure white (not a single subpixel in the viewport will be off, I promise) (default: 10)\n* `MISERY_ASP_ERROR_PROBABILITY`: a free bonus for ASP lovers (and I'm sure there are plenty around here), the template renders just great. Oh and: to make it even more beautiful, it's in French (default: 10). Quick preview:\n\n![ASP error overview](http://img11.hostingpics.net/pics/560987ASPerror.png)\n\nBy default, miserable users have approximately a 50-50 chance to see the real page. They won't stay long, I promise.\n\n## Miscellaneous\n\nInspired by the [Drupal Misery module](http://drupal.org/project/misery), see also [\"Suspension, Ban or Hellban?\"](http://www.codinghorror.com/blog/2011/06/suspension-ban-or-hellban.html) for hellbanning.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/fschwebel/django-misery/", "keywords": "django misery hellban slowban", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "django-misery", "package_url": "https://pypi.org/project/django-misery/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-misery/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/fschwebel/django-misery/" }, "release_url": "https://pypi.org/project/django-misery/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "A simple ban system for Django, that does nasty stuff to trolls wandering on your website.", "version": "0.0.3" }, "last_serial": 762425, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "fd9c84aa226fb3e82a843f6649c8188f", "sha256": "add55838be99285317034989c5a3e19fabb0be4b2a3c35fdb8d905eb67d05ba4" }, "downloads": -1, "filename": "django-misery-0.0.2.tar.gz", "has_sig": false, "md5_digest": "fd9c84aa226fb3e82a843f6649c8188f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5794, "upload_time": "2012-07-14T18:29:14", "url": "https://files.pythonhosted.org/packages/d0/20/e3b9a54d405885769357741e869b7ae40c4007f2c4dcca2c2b7a6d29931f/django-misery-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "df544f2463e530036648cbfc334e4758", "sha256": "a896aeb08cb5a57e9deb177269dacf26cbbb6ee9bc417d9904e3ddd61a6201d8" }, "downloads": -1, "filename": "django-misery-0.0.3.tar.gz", "has_sig": false, "md5_digest": "df544f2463e530036648cbfc334e4758", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5872, "upload_time": "2012-08-19T19:51:41", "url": "https://files.pythonhosted.org/packages/b9/7c/7d644fe12d64cea404a239aa62b1713e53dc0808e19595d7763c5a78d390/django-misery-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "df544f2463e530036648cbfc334e4758", "sha256": "a896aeb08cb5a57e9deb177269dacf26cbbb6ee9bc417d9904e3ddd61a6201d8" }, "downloads": -1, "filename": "django-misery-0.0.3.tar.gz", "has_sig": false, "md5_digest": "df544f2463e530036648cbfc334e4758", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5872, "upload_time": "2012-08-19T19:51:41", "url": "https://files.pythonhosted.org/packages/b9/7c/7d644fe12d64cea404a239aa62b1713e53dc0808e19595d7763c5a78d390/django-misery-0.0.3.tar.gz" } ] }