Author: jacob
Date: 2008-09-01 17:22:12 -0500 (Mon, 01 Sep 2008)
New Revision: 8820

Modified:
   django/trunk/django/forms/models.py
Log:
Fixed #8777: use better capitalization in unique together error message. 
Thanks, Petr Marhoun.

Modified: django/trunk/django/forms/models.py
===================================================================
--- django/trunk/django/forms/models.py 2008-09-01 22:15:35 UTC (rev 8819)
+++ django/trunk/django/forms/models.py 2008-09-01 22:22:12 UTC (rev 8820)
@@ -5,7 +5,7 @@
 
 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 @@
             # 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:


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to