def meta_description(request):
    """
    {% meta_description request %}
    """
    try:
        fragments = request._feincms_fragments
    except:
        fragments = {}

    if '_meta_description' in fragments and fragments.get("_meta_description"):
        return fragments.get("_meta_description")
    else:
        # append desc
        site_desc = getattr(settings, 'META_DESCRIPTION', '')

        if site_desc != '':
            return getattr(request.leonardo_page,
                           "meta_description", request.leonardo_page.meta_description) \
                + ' - ' + site_desc

        return getattr(request.leonardo_page,
                       "meta_description", request.leonardo_page.meta_description)
def meta_description ( request ) : try : fragments = request . _feincms_fragments except : fragments = { } if '_meta_description' in fragments and fragments . get ( "_meta_description" ) : return fragments . get ( "_meta_description" ) else : site_desc = getattr ( settings , 'META_DESCRIPTION' , '' ) if site_desc != '' : return getattr ( request . leonardo_page , "meta_description" , request . leonardo_page . meta_description ) + ' - ' + site_desc return getattr ( request . leonardo_page , "meta_description" , request . leonardo_page . meta_description )
{% meta_description request %}