def model_ngettext(obj, n=None):
 if isinstance(obj, models.query.QuerySet):
  if (n is None):
   n = obj.count()
  obj = obj.model
 d = model_format_dict(obj)
 (singular, plural) = (d['verbose_name'], d['verbose_name_plural'])
 return ungettext(singular, plural, (n or 0))

def model_ngettext ( obj , n = None ) : if isinstance ( obj , models . query . QuerySet ) : if ( n is None ) : n = obj . count ( ) obj = obj . model d = model_format_dict ( obj ) ( singular , plural ) = ( d [ 'verbose_name' ] , d [ 'verbose_name_plural' ] ) return ungettext ( singular , plural , ( n or 0 ) )
return the appropriate verbose_name or verbose_name_plural value for obj depending on the count n .