def processor_for(content_model_or_slug, exact_page=False):
    content_model = None
    slug = ""
    if isinstance(content_model_or_slug, (str, _str)):
        try:
            parts = content_model_or_slug.split(".", 1)
            content_model = apps.get_model(*parts)
        except (TypeError, ValueError, LookupError):
            slug = content_model_or_slug
    elif issubclass(content_model_or_slug, Page):
        content_model = content_model_or_slug
    else:
        raise TypeError("%s is not a valid argument for page_processor, "
                        "which should be a model subclass of Page in class "
                        "or string form (app.model), or a valid slug" %
                        content_model_or_slug)

    def decorator(func):
        parts = (func, exact_page)
        if content_model:
            model_name = content_model._meta.object_name.lower()
            processors[model_name].insert(0, parts)
        else:
            processors["slug:%s" % slug].insert(0, parts)
        return func
    return decorator
Processor for generic options.
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/pages/page_processors.py/processor_for--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/cli.py/SetGenericOpcodeOpts