From f576b23a652eba69667ab3ce42aaf5f6b3e6f4ea Mon Sep 17 00:00:00 2001 From: Szilveszter Farkas Date: Sun, 12 Jul 2015 10:39:44 -0500 Subject: [PATCH] Fixed #25073 -- Added verbose_name to contrib's model fields that were missing it. --- django/contrib/admin/models.py | 4 ++-- django/contrib/auth/models.py | 2 +- django/contrib/flatpages/models.py | 2 +- django/contrib/redirects/models.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/django/contrib/admin/models.py b/django/contrib/admin/models.py index de4a252efa..65c18d99af 100644 --- a/django/contrib/admin/models.py +++ b/django/contrib/admin/models.py @@ -27,8 +27,8 @@ class LogEntryManager(models.Manager): @python_2_unicode_compatible class LogEntry(models.Model): action_time = models.DateTimeField(_('action time'), auto_now=True) - user = models.ForeignKey(settings.AUTH_USER_MODEL) - content_type = models.ForeignKey(ContentType, blank=True, null=True) + user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_('user')) + content_type = models.ForeignKey(ContentType, verbose_name=_('content type'), blank=True, null=True) object_id = models.TextField(_('object id'), blank=True, null=True) object_repr = models.CharField(_('object repr'), max_length=200) action_flag = models.PositiveSmallIntegerField(_('action flag')) diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index ad46c5ce7c..febadfc1be 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -59,7 +59,7 @@ class Permission(models.Model): created for each Django model. """ name = models.CharField(_('name'), max_length=255) - content_type = models.ForeignKey(ContentType) + content_type = models.ForeignKey(ContentType, verbose_name=_('content type')) codename = models.CharField(_('codename'), max_length=100) objects = PermissionManager() diff --git a/django/contrib/flatpages/models.py b/django/contrib/flatpages/models.py index eac4edd122..69e84f8670 100644 --- a/django/contrib/flatpages/models.py +++ b/django/contrib/flatpages/models.py @@ -22,7 +22,7 @@ class FlatPage(models.Model): registration_required = models.BooleanField(_('registration required'), help_text=_("If this is checked, only logged-in users will be able to view the page."), default=False) - sites = models.ManyToManyField(Site) + sites = models.ManyToManyField(Site, verbose_name=_('sites')) class Meta: db_table = 'django_flatpage' diff --git a/django/contrib/redirects/models.py b/django/contrib/redirects/models.py index 2d26673121..254f66b478 100644 --- a/django/contrib/redirects/models.py +++ b/django/contrib/redirects/models.py @@ -6,7 +6,7 @@ from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Redirect(models.Model): - site = models.ForeignKey(Site) + site = models.ForeignKey(Site, verbose_name=_('site')) old_path = models.CharField(_('redirect from'), max_length=200, db_index=True, help_text=_("This should be an absolute path, excluding the domain name. Example: '/events/search/'.")) new_path = models.CharField(_('redirect to'), max_length=200, blank=True,