project_home_tags/templatetags/project_home.py
def silence_without_namespace(f):
    """Decorator to silence template tags if 'PROJECT_HOME_NAMESPACE' is
    not defined in settings.

    Usage Example:
        from django import template


        register = template.Library()

        @register.simple_tag
        @silence_without_namespace
        def a_template_tag(*args):
            ...
    """
    @wraps(f)
    def wrapped(label=None):
        if not home_namespace:
            return ''
        if label:
            return f(label)
        else:
            return f(home_label)
    return wrapped
def silence_without_namespace(f):
    """Decorator to silence template tags if 'PROJECT_HOME_NAMESPACE' is
    not defined in settings.

    Usage Example:
        from django import template


        register = template.Library()

        @register.simple_tag
        @silence_without_namespace
        def a_template_tag(*args):
            ...
    """
    @wraps(f)
    def wrapped(label=None):
        if not home_namespace:
            return ''
        if label:
            return f(label)
        else:
            return f(home_label)
    return wrapped
Decorator to silence template tags if 'PROJECT_HOME_NAMESPACE' is
    not defined in settings.

    Usage Example:
        from django import template


        register = template.Library()

        @register.simple_tag
        @silence_without_namespace
        def a_template_tag(*args):
            ...