semvec/pypi-packages huggingface dataset:
django-ratelimit9 0.1
App that dynamically adds reCAPTCHA field to forms when user exceeds the rate limit
License: MIT License

*****************
django-ratelimit9
*****************

``django-ratelimit9`` combines `django-recaptcha <https://github.com/praekelt/django-recaptcha>`_ and `django-ratelimit <https://github.com/jsocol/django-ratelimit>`_ into a single app.

Each time when a limit is exceeded a reCAPTCHA field is dynamically appended to a Form.  

Make sure you have read the docs of these two requirements in order to learn how to set up limits and customize the reCAPTCHA.

Requirements
============

- `django-recaptcha <https://github.com/praekelt/django-recaptcha>`_

- `django-ratelimit <https://github.com/jsocol/django-ratelimit>`_

Installation
============

- Install via pip::

    pip install django-ratelimit9

- Add ``ratelimit9`` to your ``INSTALLED_APPS``

Usage
=====

Let's say you want to use view ``MyView`` along with ``MyForm`` form.

Code for your ``forms.py``::

	from django.forms import Form
	from ratelimit9.forms import Ratelimit9Form
	
	class MyForm(Ratelimit9Form, ModelForm):
		# ...

Code for your ``views.py``::

	from django.views.generic import CreateView
	from ratelimit9.mixins import Ratelimit9Mixin
	
	class MyView(Ratelimit9Mixin, CreateView):
		ratelimit_key = 'ip'
		ratelimit_rate = '5/m'
		# ...
django-unslashed 0.3.0
Django Middleware that can automatically remove trailing URL slashes and 301 redirect to the non-slash-terminated URL.
License: MIT License
Keywords: django slash remove trailing unslash remove_slash path

django-unslashed
================

.. image:: https://pypip.in/version/django-unslashed/badge.png
    :target: https://pypi.python.org/pypi/django-unslashed/
    :alt: Latest Version

.. image:: https://travis-ci.org/dghubble/django-unslashed.png
    :target: https://travis-ci.org/dghubble/django-unslashed
    :alt: Build Status

.. image:: https://pypip.in/download/django-unslashed/badge.png
    :target: https://pypi.python.org/pypi/django-unslashed/
    :alt: Downloads

.. image:: https://pypip.in/license/django-unslashed/badge.png
    :target: https://pypi.python.org/pypi/django-unslashed/
    :alt: License

This middleware provides the inverse of the Django CommonMiddleware :code:`APPEND_SLASH` feature. It can automatically remove trailing URL slashes and 301 redirect to the non-slash-terminated URL. This behavior is performed if the initial URL ends in a slash and is invalid, removing the trailing slash produces a valid URL, and :code:`REMOVE_SLASH` is set to True. Otherwise there is no effect.

For example, :code:`foo.com/bar/` will be redirected to :code:`foo.com/bar` if you don't have a valid URL pattern for :code:`foo.com/bar/` but do have a valid pattern for foo.com/bar and :code:`REMOVE_SLASH=True`.