Use django.test.TestCase rather than explicit tearDown
Fix lint
Add bulkCreate helper to otmTypeahead
Fix delete_tree url to match routed args
Pass treeId through from plot_detail endpoint

Tree ID is always passed through (either as a number or null) to ajax callers of the plot_detail endpoint. plot.js listens for treeId values and puts them into the edit form.

This is required so that we can put the newly created tree id into the edit form. Having the id in the edit form, in turn, is required in order to be able to delete a tree after adding it, without reloading the page.
Add frontend support for tree & plot deletion
Show deleted trees in recent edits table
Merge pull request #951 from steventlamb/topic/delete_tree_frontend

Topic/delete tree frontend
Refactor: move functions accessing species CODES to species.py
Merge pull request #952 from RickMohr/refactor-CODES-functions

Refactor: move functions accessing species CODES to species.py
Modify delete template tag to match audit logic

There was a bug on staging because these two different code paths treat UDFs differently. This problem is fixed by using the same test in the template tag that is used in the audit system.
Update delete button activation condition

Reads the correct permissions for tree when tree is the object to be deleted.
Fix import of species_codes_for_regions
Return false if instanceuser is None

fixes

"""
ERROR: test_plot_detail (treemap.tests.urls.TreemapUrlTests)

[localhost] out:   File "/usr/local/otm/app/opentreemap/treemap/templatetags/instance_config.py", line 50, in is_deletable
[localhost] out:     return obj.user_can_delete(instanceuser.user)
[localhost] out: AttributeError: 'NoneType' object has no attribute 'user'
"""
Fix localization of tree ids

This was causing malformed urls on servers with >1000 trees, due to the presence of commas.
Use values() instead of objects in _load_itree_code_overrides()
Management command random_trees now takes an option for probability of diameter existing
Require species (rather than otm code) for benefits calculation

Now that we have ITreeCodeOverride's, species without OTM codes can contribute to benefits calculations
Merge pull request #955 from RickMohr/itree-override-performance

Fix performance issues when computing benefits with ITreeCodeOverride table
Add exit prompt when leaving unsaved changes

When leaving certain data entry modes, including but not limited to 'Add Tree' and 'Edit Tree', you can now lock the page so that the user will be prompted before leaving the page, or before leaving that particular edit mode.