diff -r da58c69195c6 django/forms/models.py
--- a/django/forms/models.py	Fri Dec 11 06:16:43 2009 -0300
+++ b/django/forms/models.py	Fri Dec 11 09:28:49 2009 -0300
@@ -9,7 +9,7 @@
 from django.utils.translation import ugettext_lazy as _, ugettext
 
 from util import ValidationError, ErrorList
-from forms import BaseForm, get_declared_fields, NON_FIELD_ERRORS
+from forms import BaseForm, get_declared_fields, NON_FIELD_ERRORS, pretty_name
 from fields import Field, ChoiceField, IntegerField, EMPTY_VALUES
 from widgets import Select, SelectMultiple, HiddenInput, MultipleHiddenInput
 from widgets import media_property
@@ -373,6 +373,8 @@
         if len(unique_check) == 1:
             field_name = unique_check[0]
             field_label = self.fields[field_name].label
+            if field_label is None:
+                field_label = pretty_name(field_name)
             # Insert the error into the error dict, very sneaky
             return _(u"%(model_name)s with this %(field_label)s already exists.") %  {
                 'model_name': unicode(model_name),
@@ -380,7 +382,12 @@
             }
         # unique_together
         else:
-            field_labels = [self.fields[field_name].label for field_name in unique_check]
+            def pretty_label(fld_name):
+                label = self.fields[field_name].label
+                if label is None:
+                    label = pretty_name(fld_name)
+                return label
+            field_labels = [pretty_label(field_name) for field_name in unique_check]
             field_labels = get_text_list(field_labels, _('and'))
             return _(u"%(model_name)s with this %(field_label)s already exists.") %  {
                 'model_name': unicode(model_name),
diff -r da58c69195c6 tests/regressiontests/model_forms_regress/models.py
--- a/tests/regressiontests/model_forms_regress/models.py	Fri Dec 11 06:16:43 2009 -0300
+++ b/tests/regressiontests/model_forms_regress/models.py	Fri Dec 11 09:28:49 2009 -0300
@@ -37,3 +37,13 @@
 
 class CustomFF(models.Model):
     f = CustomFileField(upload_to='unused', blank=True)
+
+class Edition(models.Model):
+    author = models.ForeignKey(Person)
+    publication = models.ForeignKey(Publication)
+    edition = models.IntegerField()
+    isbn = models.CharField(max_length=13, unique=True)
+
+    class Meta:
+        unique_together = (('author', 'publication'), ('publication', 'edition'),)
+
diff -r da58c69195c6 tests/regressiontests/model_forms_regress/tests.py
--- a/tests/regressiontests/model_forms_regress/tests.py	Fri Dec 11 06:16:43 2009 -0300
+++ b/tests/regressiontests/model_forms_regress/tests.py	Fri Dec 11 09:28:49 2009 -0300
@@ -6,7 +6,7 @@
 from django.conf import settings
 from django.test import TestCase
 
-from models import Person, Triple, FilePathModel, Article, Publication, CustomFF
+from models import Person, Triple, FilePathModel, Article, Publication, CustomFF, Edition
 
 class ModelMultipleChoiceFieldTests(TestCase):
 
@@ -96,8 +96,38 @@
 class CustomFieldSaveTests(TestCase):
     def test_save(self):
         "Regression for #11149: save_form_data should be called only once"
-        
+
         # It's enough that the form saves without error -- the custom save routine will
         # generate an AssertionError if it is called more than once during save.
         form = CFFForm(data = {'f': None})
-        form.save()
\ No newline at end of file
+        form.save()
+
+
+class EditionForm(forms.ModelForm):
+    author = forms.ModelChoiceField(queryset=Person.objects.all())
+    publication = forms.ModelChoiceField(queryset=Publication.objects.all())
+    edition = forms.IntegerField()
+    isbn = forms.CharField(max_length=13)
+
+    class Meta:
+        model = Edition
+
+class UniqueErrorsTests(TestCase):
+
+    def setUp(self):
+        self.author1 = Person.objects.create(name=u'Author #1')
+        self.author2 = Person.objects.create(name=u'Author #2')
+        self.pub1 = Publication.objects.create(title='Pub #1', date_published=date(2000, 10, 31))
+        self.pub2 = Publication.objects.create(title='Pub #2', date_published=date(2004, 1, 5))
+        form = EditionForm(data={'author': self.author1.pk, 'publication': self.pub1.pk, 'edition': 1, 'isbn': '9783161484100'})
+        form.save()
+
+    def test_unique_error_message(self):
+        form = EditionForm(data={'author': self.author1.pk, 'publication': self.pub2.pk, 'edition': 1, 'isbn': '9783161484100'})
+        self.assertEquals(form.errors, {'isbn': [u'Edition with this Isbn already exists.']})
+
+    def test_unique_together_error_message(self):
+        form = EditionForm(data={'author': self.author1.pk, 'publication': self.pub1.pk, 'edition': 2, 'isbn': '9783161489999'})
+        self.assertEquals(form.errors, {'__all__': [u'Edition with this Author and Publication already exists.']})
+        form = EditionForm(data={'author': self.author2.pk, 'publication': self.pub1.pk, 'edition': 1, 'isbn': '9783161487777'})
+        self.assertEquals(form.errors, {'__all__': [u'Edition with this Publication and Edition already exists.']})
