wagtail-nest / wagtail-review

A Wagtail extension for gathering annotations and feedback on pages before publication
BSD 3-Clause "New" or "Revised" License
49 stars 19 forks source link

WIP: Use multi-table inheritance for review types #14

Closed kaedroho closed 4 years ago

kaedroho commented 5 years ago

This is a start on implementing multiple review types using multi table inheritance instead of a swappable model

I prefer this option for the following reasons:

Its main disadvantage is performance, but I think it would certainly be fast enough as we already use MTI for Wagtail pages.

My proposed configuration for this is as follows:

WAGTAILREVIEW_REVIEW_TYPES = {
    'clinical': 'myapp.ClinicalReview',
    'editorial': 'myapp.EditorialReview',
}

These models must inherit from wagtail_review.ReviewRequest. The models will have methods that can be overridden to customise the form an various behaviours. Proxy models may be used if specific fields are not required.

kaedroho commented 4 years ago

Abandoning this in favour of integration with Wagtail's new workflow feature (which would make this redundant)