mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-07 23:49:42 +00:00
Versioning module now does magic
Automatic creation of views/urls for anything registered with reversion, with a small amount of hackage to preserve legacy stuff. (and the DAMNED asset IDs!) I would never get distracted...
This commit is contained in:
@@ -19,7 +19,7 @@ from premailer import Premailer
|
||||
from z3c.rml import rml2pdf
|
||||
|
||||
from RIGS import models
|
||||
from versioning.versioning import models_for_feed
|
||||
from reversion import revisions as reversion
|
||||
|
||||
|
||||
def send_eventauthorisation_success_email(instance):
|
||||
@@ -142,11 +142,9 @@ def send_admin_awaiting_approval_email(user, request, **kwargs):
|
||||
user_activated.connect(send_admin_awaiting_approval_email)
|
||||
|
||||
# TODO Move
|
||||
|
||||
|
||||
def update_cache(sender, instance, created, **kwargs):
|
||||
cache.clear()
|
||||
|
||||
|
||||
for model in models_for_feed():
|
||||
for model in reversion.get_registered_models():
|
||||
post_save.connect(update_cache, sender=model)
|
||||
|
||||
Reference in New Issue
Block a user