def __init__(self):
        from tardis.tardis_portal.models import Dataset_File
        for f in settings.POST_SAVE_FILTERS:
            cls = f[0]
            args = []
            kw = {}

            if len(f) == 2:
                args = f[1]

            if len(f) == 3:
                kw = f[2]

            hook = self._safe_import(cls, args, kw)
            # XXX seems to requre a strong ref else it won't fire,
            # could be because some hooks are classes not functions.
            post_save.connect(hook, sender=Dataset_File, weak=False)
            logger.debug('Initialised postsave hook %s' % post_save.receivers)

        # disable middleware
        raise MiddlewareNotUsed()