Defining ForeignKeys/OneToOneFields without an on_delete action is deprecated in Django 1.9.
This commit adds on_delete=CASCADE to every ForeignKey that doesn't yet have an on_delete action.
The .start() method now returns an ElasticSearchIndex object that you should perform CRUD operations against instead
This commit removes a nice test that will be reintroduced later
This class represents an individual index in Elasticsearch.
This commit also refactors duplicated implementations of the CRUD methods for updating documents and mappings in the database. These now all live in the new index class.
tagit was initialized from both the AdminTagWidget, and from the `done`
method in the image uploader. Initializing it twice led to strange
errors and ultimately the tags not being saved on the image model.
As the tag widget now contains its own initialisation <script>, tag
inputs do not need to be specially handled by AJAX code any more, so
this can simply be removed.
Fixes#2142
Page EditHandlers must return a subclass of WagtailAdminPageForm to work
correctly. A check has been added to ensure this is the case, raising an
error on startup otherwise.
EditHandlers that can produce forms can now specify which base form
class to use. This defaults to WagtailAdminModelForm, which was the hard
coded base class previously.
Only TabbedInterface and ObjectList EditHandlers now support generating
a form. Other EditHandlers generating forms was not used anywhere except
in the tests.
A new helper class in wagtailadmin.utils, PermissionPolicyChecker, is added to provide permission check decorators for the admin views. (This is out of scope for the wagtailcore.permissions module, because it depends on wagtailadmin to supply the 'permission denied' response.)
Not currently implemented - disabling the edit links on the index page listing, for users without change permission. To do this efficiently (and within the constraints of Django templating), we'd need to implement a user/instance-specific lookup object, as we do for pages.
These modules allow all permission logic ('can user X do Y', 'can user X do Y on instance Z', 'who are the users who can do Y on instance Z') to be moved into a single module that can be potentially swapped out to provide new permission rules without changing the rest of the code.
Instead of filling an array with `None` to indicate no errors, a
dictionary is only set when there is an actual error. This will allow
future functionality for errors to be added to the StreamField itself,
rather than a block, similar to adding errors to a form rather than a
specific field.