This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Wad of Stuff Django Forms
=========================

A set of utility functions and classes to extend the functionality of Django
forms.

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

Django 1.0 or newer.

Functions
=========

wadofstuff.django.forms.security_hash(request, form, exclude=None, *args)
-------------------------------------------------------------------------

Calculates a security hash for the given Form/FormSet instance.

This creates a list of the form field names/values in a deterministic
order, pickles the result with the SECRET_KEY setting, then takes an md5
hash of that.

Allows a list of form fields to be excluded from the hash calculation. This
is useful form fields that may have their values set programmatically.

Classes
=======

wadofstuff.django.forms.BoundFormWizard
---------------------------------------

A subclass of Django's FormWizard that adds the following functionality:

- Renders `previous_fields` as a list of bound form fields in the template
context rather than as raw html.
- Can handle FormSets.

The usage of this class is identical to that documented at
http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/ with
the exception that when rendering `previous_fields` you should change your
wizard step templates from:

<input type="hidden" name="{{ step_field }}" value="{{ step0 }}"/>
{{ previous_fields|safe }}

to:

<input type="hidden" name="{{ step_field }}" value="{{ step0 }}"/>
{% for f in previous_fields %}{{ f.as_hidden }}{% endfor %}

wadofstuff.django.forms.RequireOneFormSet
-----------------------------------------

A subclass of Django's BaseInlineFormSet that requires at least one form in
the formset to be completed.

Use this class as the `formset` argument to `inlineformset_factory`.

When the formset is validated and it does not contain one or more entries, then
a `ValidationError` is raised which gets put into `formset.non_form_errors`. You
will need to check this in your templates if you wish to display the error
message to your users.

What's new
==========

Version 1.1.0:

- Added RequireOneFormSet inline formset class.
- Modified to allow classes and functions to be imported from wadofstuff.django.forms.

Version 1.0.0:

- First public release.
Release History

Release History

1.1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting