django-careful-forms 0.1

Security minded forms extension for Django
django-careful-forms is a small extension on top of django's Forms system. It can help you discover potential security oversights in your forms.

It will emit warnings if there are any fields defined on forms that have not been accessed (the asumption beeing that not accessed fields will also not have been rendered in the template / displayed to the user).

Installation

The easy & recommended way:

pip install django-careful-forms

pip: http://www.pip-installer.org/en/latest/index.html

Usage

#. Add ``"careful_forms.middleware.CarefulFormsMiddlware"`` to your projects ``settings.MIDDLEWARE_CLASSES``. You should add it near the beginning of the list to make sure all forms are covered.

#. For every form that you want to be monitored by django-careful-forms change the base class of your forms to ``careful_forms.forms.CarefulModelForm`` (or ``CarefulForm`` for regular    forms).

In case you already have a custom form base class you can also add ``CarefulFormMixin`` to it.

Examples:

.. code:: python

    class MyForm(CarefulForm):
        # ...

    class OtherForm(CarefulModelForm):
        # ...

    class YetMoreForms(CarefulFormMixin, CustomFormBaseClass):
        # ...

last updated on:
June 9th, 2012, 23:20 GMT
price:
FREE!
developed by:
Ulrich Petri
homepage:
github.com
license type:
MIT/X Consortium License 
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT