The feature matrix is now modified to be helpful for newer users.
Entries now go from neweset version to oldest, as well as
displaying all entries by default.
We were already using signals for everything except delete, and even
in our old version of django the delete signal exists (it didn't exist
when this code was first written).
Django doesn't really like models to be OOP like this, so keeping PgModel
would cause issues with upcoming changes in django 1.8. Using simple functions
is easier, and the actual functionality is replicated straight off.
Requires manual sql to be run on all installations:
BEGIN;
ALTER TABLE featurematrix_feature ADD COLUMN v92 int;
UPDATE featurematrix_feature SET v92=v91;
ALTER TABLE featurematrix_feature ALTER COLUMN v92 SET NOT NULL;
COMMIT;
Turn the feature matrix fields into their own class and add a paramter
for visible_default to it. Turning this off will hide them from view.
In the future this could be expanded to make it dynamic, but for now let's
just stick to being able to statically hide them.
This allows all models inherited from PgModel to specify which
URLs to purge by either setting a field or defining a function
called purge_urls, at which point they will be purged whenever
the save signal is fired.
Also implements a form under /admin/purge/ that allows for manual
purging. This should probably be extended in the future to show
the status of the pgq slaves, but that will come later.
Includes a SQL function that posts the expires to a pgq queue. For
a local deployment, this can be replaced with a simple void function
to turn off varnish purging.