Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

newforms-admin: Fixed #5401 -- make-messages.py works again. Thanks, …

…Petr Marhoun

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit aff1c2aa96df00da61d0335c05bc592bffd29e32 1 parent 84fd07f
@adrianholovaty adrianholovaty authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 django/contrib/admindocs/views.py
View
6 django/contrib/admindocs/views.py
@@ -169,7 +169,7 @@ def model_detail(request, app_label, model_name):
model = m
break
if model is None:
- raise Http404, _("Model %r not found in app %r") % (model_name, app_label)
+ raise Http404, _("Model %(model_name)r not found in app %(app_label)r") % {'model_name': model_name, 'app_label': app_label}
opts = model._meta
@@ -181,7 +181,7 @@ def model_detail(request, app_label, model_name):
if isinstance(field, models.ForeignKey):
data_type = related_object_name = field.rel.to.__name__
app_label = field.rel.to._meta.app_label
- verbose = utils.parse_rst((_("the related `%s.%s` object") % (app_label, data_type)), 'model', _('model:') + data_type)
+ verbose = utils.parse_rst((_("the related `%(app_label)s.%(data_type)s` object") % {'app_label': app_label, 'data_type': data_type}), 'model', _('model:') + data_type)
else:
data_type = get_readable_field_data_type(field)
verbose = field.verbose_name
@@ -212,7 +212,7 @@ def model_detail(request, app_label, model_name):
# Gather related objects
for rel in opts.get_all_related_objects():
- verbose = _("related `%s.%s` objects") % (rel.opts.app_label, rel.opts.object_name)
+ verbose = _("related `%(app_label)s.%(object_name)s` objects") % {'app_label': rel.opts.app_label, 'object_name': rel.opts.object_name}
accessor = rel.get_accessor_name()
fields.append({
'name' : "%s.all" % accessor,
Please sign in to comment.
Something went wrong with that request. Please try again.