Removed post() method.

This isn't called, leftover from prototype.
Updated ajax test.

The request object has an is_ajax() call that can be used instead of
re-implementing the same logic.
Changed model_class to be optional in patterns_for()

When a model_class is not passed in, the url_prefix is required.  This
allows to use a Resource without a model.  In this case, it's assumed
the ResourceView is being subclassed to handle fetching data.
Updated patterns_for() to take url_prefix and template_dir.

In order to use without a model, specify the needed bits for the
existing functionality.
Pulled out logic for getting items for index view.

The logic that gets items for the index view can now be replaced in a
subclass by defining the _get_items() method.
Refactored forms.

There are now two types of forms: one that can be used with a Django
model, ResourceModelForm, and another that can be used for any type of
form, ResourceForm.

Common logic for these two forms are in the BaseResourceForm mixin
class.
Refactored form logic.

Based on the new form classes available, properly construct the
arguments.
Construct a query dictionary for PUT requests.

For right now, assume that PUT requests are coming in constructed like a
typical POST.
Refactored update() method into smaller task methods.

This allows a subclass to re-implement part of the behavior rather than
having to copy and paste the entire function to change some
functionality.
Allows request to pass a url to redirect to
Adds item to the context for the edit template
Removes trailing comma which creates unintended tuple object
Updated logic and comments for getting the redirect URL.
Refactored logic for next URL into a function.

The create() and update() methods use the same logic for finding the
next URL.
Broke down create() into smaller helper methods.
Resourceful redirect tries to use 'next' parameter
Added _create_save() method.

This passes along the form for saving, which can be customized by a
subclass.
Updated render functions to take status parameter.

The render functions can set the status for the requests.
Added errors to context.

This is a list of messages that are not HTML-formatted.
Updated _create_success() to handle json.

When the request format is JSON, return a structure with a success
message and the JSON-encoded item created.