diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-09-01 22:22:12 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-09-01 22:22:12 +0000 |
| commit | d86a702d37784c6f4b91f65c1a795b47144e5598 (patch) | |
| tree | 9283557d7ed2ed279cc2fb38f5d3e9713776a4db | |
| parent | 3a18002bbd3b08fb3ee40d681bdda1a39eb0ad9c (diff) | |
Fixed #8777: use better capitalization in unique together error message. Thanks, Petr Marhoun.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/forms/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/models.py b/django/forms/models.py index c153512f75..bed76e9fd1 100644 --- a/django/forms/models.py +++ b/django/forms/models.py @@ -5,7 +5,7 @@ and database field objects. from django.utils.encoding import smart_unicode from django.utils.datastructures import SortedDict -from django.utils.text import get_text_list +from django.utils.text import get_text_list, capfirst from django.utils.translation import ugettext_lazy as _ from util import ValidationError, ErrorList @@ -247,7 +247,7 @@ class BaseModelForm(BaseForm): # This cute trick with extra/values is the most efficiant way to # tell if a particular query returns any results. if qs.extra(select={'a': 1}).values('a').order_by(): - model_name = self.instance._meta.verbose_name.title() + model_name = capfirst(self.instance._meta.verbose_name) # A unique field if len(unique_check) == 1: |
