django-careful-forms

Security minded forms extension for Django
Download

django-careful-forms Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Ulrich Petri
  • Publisher web site:
  • http://github.com/ulope/

django-careful-forms Tags


django-careful-forms Description

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).InstallationThe easy & recommended way:pip install django-careful-formspip: http://www.pip-installer.org/en/latest/index.htmlUsage#. 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): # ...Product's homepage


django-careful-forms Related Software