示例#1
0
def register_core_hooks():
    # any trylater hooks implemented in r2 should be registered in this
    # function to ensure that they are available when trylater runs.
    from r2.models.account import trylater_hooks
    trylater_hooks.register_all()
    from r2.models import subreddit
    subreddit.trylater_hooks.register_all()
示例#2
0
def register_hooks():
    """Register all known non-plugin hooks. Called on app setup."""
    from r2.config.feature.feature import feature_hooks
    feature_hooks.register_all()

    from r2.models.admintools import admintools_hooks
    admintools_hooks.register_all()

    from r2.models.account import trylater_hooks
    trylater_hooks.register_all()

    from r2.models import subreddit
    subreddit.trylater_hooks.register_all()