def is_editable(obj, request):
 if hasattr(obj, u'is_editable'):
  return obj.is_editable(request)
 else:
  codename = get_permission_codename(u'change', obj._meta)
  perm = (u'%s.%s' % (obj._meta.app_label, codename))
  return (request.user.is_authenticated() and has_site_permission(request.user) and request.user.has_perm(perm))

def is_editable ( obj , request ) : if hasattr ( obj , u'is_editable' ) : return obj . is_editable ( request ) else : codename = get_permission_codename ( u'change' , obj . _meta ) perm = ( u'%s.%s' % ( obj . _meta . app_label , codename ) ) return ( request . user . is_authenticated ( ) and has_site_permission ( request . user ) and request . user . has_perm ( perm ) )
returns true if the object is editable for the request .