django-careful-forms 0.1

Security minded forms extension for Django

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
MIT/X Consortium License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Ulrich Petri
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
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

requirements

#secure forms #Django forms #Django #forms #extension #security

Add your review!

SUBMIT