Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #8777: use better capitalization in unique together error messa…

…ge. Thanks, Petr Marhoun.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d86a702d37784c6f4b91f65c1a795b47144e5598 1 parent 3a18002
Jacob Kaplan-Moss authored September 01, 2008

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/forms/models.py
4  django/forms/models.py
@@ -5,7 +5,7 @@
5 5
 
6 6
 from django.utils.encoding import smart_unicode
7 7
 from django.utils.datastructures import SortedDict
8  
-from django.utils.text import get_text_list
  8
+from django.utils.text import get_text_list, capfirst
9 9
 from django.utils.translation import ugettext_lazy as _
10 10
 
11 11
 from util import ValidationError, ErrorList
@@ -247,7 +247,7 @@ def validate_unique(self):
247 247
             # This cute trick with extra/values is the most efficiant way to
248 248
             # tell if a particular query returns any results.
249 249
             if qs.extra(select={'a': 1}).values('a').order_by():
250  
-                model_name = self.instance._meta.verbose_name.title()
  250
+                model_name = capfirst(self.instance._meta.verbose_name)
251 251
                 
252 252
                 # A unique field
253 253
                 if len(unique_check) == 1:

0 notes on commit d86a702

Please sign in to comment.
Something went wrong with that request. Please try again.