def urlizetrunc(value, limit, autoescape=True):
    """
    Convert URLs into clickable links, truncating URLs to the given character
    limit, and adding 'rel=nofollow' attribute to discourage spamming.

    Argument: Length to truncate URLs to.
    """
    return mark_safe(_urlize(value, trim_url_limit=int(limit), nofollow=True, autoescape=autoescape))
Exemple #2
0
def urlizetrunc(value, limit, autoescape=True):
    """
    Convert URLs into clickable links, truncating URLs to the given character
    limit, and adding 'rel=nofollow' attribute to discourage spamming.

    Argument: Length to truncate URLs to.
    """
    return mark_safe(
        _urlize(value,
                trim_url_limit=int(limit),
                nofollow=True,
                autoescape=autoescape))
def urlize(value, autoescape=True):
    """Convert URLs in plain text into clickable links."""
    return mark_safe(_urlize(value, nofollow=True, autoescape=autoescape))
Exemple #4
0
def urlize(value, autoescape=True):
    """Converts URLs in plain text into clickable links."""
    return mark_safe(_urlize(value, nofollow=True, autoescape=autoescape))
def urlize(value, autoescape=True):
    """Convert URLs in plain text into clickable links."""
    # 直接把 object 转 可点击的 url
    # 可以用 object.get_absolute_url|urlize
    return mark_safe(_urlize(value, nofollow=True, autoescape=autoescape))
"""Default variable filters."""