@register.filter
def has_fragment(request, identifier):
 return getattr(request, u'_feincms_fragments', {}).get(identifier)

@ register . filter def has_fragment ( request , identifier ) : return getattr ( request , u'_feincms_fragments' , { } ) . get ( identifier )
returns the content of the fragment .