def model_format_dict(obj):
 if isinstance(obj, (models.Model, models.base.ModelBase)):
  opts = obj._meta
 elif isinstance(obj, models.query.QuerySet):
  opts = obj.model._meta
 else:
  opts = obj
 return {'verbose_name': force_unicode(opts.verbose_name), 'verbose_name_plural': force_unicode(opts.verbose_name_plural)}

def model_format_dict ( obj ) : if isinstance ( obj , ( models . Model , models . base . ModelBase ) ) : opts = obj . _meta elif isinstance ( obj , models . query . QuerySet ) : opts = obj . model . _meta else : opts = obj return { 'verbose_name' : force_unicode ( opts . verbose_name ) , 'verbose_name_plural' : force_unicode ( opts . verbose_name_plural ) }
return a dict with keys verbose_name and verbose_name_plural .