Fix benefit to dict conversion in API

A None value was creeping into a calculation because of an if check on
a numeric function parameter

  if not dollar:

This will be true when dollar is None _and_ when dollar is 0.0 so I made
the if condition more explicit

  if dollar is None:
Merge pull request #23 from jwalgran/topic/eco-benefit-api-error

Fix benefit to dict conversion in API
added v1.2 release notes gist link to readme
Merge pull request #24 from azavea/andrewbt/topic/add-release-notes

added v1.2 release notes gist link to readme
Sort neighborhood list by state, county, and name

The 'geographies' view, on which this simplified view is based
sorts the neighborhoods alphabetically. We do not want to loose
this sorting in the simplified list.
Merge pull request #25 from jwalgran/topic/sort-hood-list

Sort neighborhood list by state, county, and name
Don't do zipcode validation

Zipcode is a hidden field populated via the geocoder.
Previously it was using a USZipCodeField to validate that
the zipcode was correct.

However, this prevents zipcodes in the UK from working
properly. Since we don't actually provide any references
to change the zipcode this error message is useless.
Fix file naming when uploading tree photos through the API

The previous version of the add tree photo API assumed the image was a PNG and
saved the file with a .png extension. This update uses the Content-Type header
to set the file extension.
Merge pull request #28 from jwalgran/topic/tree-photo-api-ext

Fix file naming when uploading tree photos through the API
Update itree import script

Make the itree import script a bit more user friendly
by adding the following:

If you are using the standard naming (for example:
AQ_Ozone_dep.csv you can omit the column name)

If you are loading the standard set of csvs you
simply provide the absolute path to the directory
containing the csv to process all the recognized
files
Merge pull request #29 from ahinz/topic/fixscripts

Fix import scripts
Fix tearDown function indent in API tests

This function was not being run because it was not in the scope
of the TestCase subclass.
Fix typo in Version test case
Update API to bidirectionally convert choice values

Greenprint requested that the number of tree condition values be
reduced. Because the iOS application has the choice options embedded
in a config file, the API must be able to bidirectionally convert 'old'
choices to 'new' choices.

This commit accomplishes this by:

1) Defining a schema for settings.CHOICE_CONVERSIONS where forward and
reverse choice conversions can be defined and triggered by mobile platform
and version. Example:

    CHOICE_CONVERSIONS = {
        'condition': {
            'version-threshold': {
                'ios': '1.2'
            },
            'forward': [
                ("1", "8"),
                ("2", "8"),
                ("3", "9"),
                ("4", "9"),
                ("5", "10"),
                ("6", "11"),
                ("7", "11")
            ],
            'reverse': [
                ("8", "1"),
                ("9", "3"),
                ("10", "5"),
                ("11", "7"),
            ]
        }
    }

2) Adding a helper method to parse version information from the
ApplicationVersion header sent with the API requests.

3) Modifying the API calls that accept and return plot/tree JSON to convert
choice values using the mapping defined in the CHOICE_CONVERSIONS setting
_only_ if the app version is below the specified threshold.

TODO: The pending values in the API responses are not yet being converted.
Add support for updating pending choice values

I extended the support for converting old choice values passed
in to the API to cover pending edits. To prevent duplicating
logic and to reduce indentation I refactored the
convert_plot_dict_choice_values function.
Merge branch 'topic/convert-choices' of git://github.com/jwalgran/OpenTreeMap into jwalgran-topic/convert-choices
Fix failures when settings.CHOICE_CONVERSIONS is not defined

The CHOICE_CONVERSIONS setting is completely optional but there were places
in the API code that expected the setting to exist.
Merge branch 'topic/convert-choices' of git://github.com/jwalgran/OpenTreeMap into jwalgran-topic/convert-choices
Fix failing test by force reloading form field choices

The choice field options in treemap.TreeAddForm are defined when the
form module is loaded and never again. When the unit test changes the CHOICES
setting, the change was not being reflected in the form.

I attempted to reload the entire treemap.forms module, but this
caused an exception to be thrown when the __init__ method of TreeAddForm
calls the super class __init__. My solution, instead, was to
force update the options in the form field.
Update api to correctly handle non-decimal version headers

The choice conversion logic raising exceptions when the client passed
an ApplicationVersion header with a non-numeric version number, including
'1.2.3' which is a valid version number. I replaced Decimal parsing with
StrictVersion from distutils and added a check that assumes that if
the version string is not parsable, that the app making the API request
is an old version.