@register.filter
def app_label(obj):
 try:
  return lower(obj._meta.object_name)
 except AttributeError:
  return ''

@ register . filter def app_label ( obj ) : try : return lower ( obj . _meta . object_name ) except AttributeError : return ''
returns an objects app label .