mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #8913 - Make "must be unique" error messages customisable. Thanks to Leah Culver.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -78,3 +78,7 @@ class FlexibleDatePost(models.Model):
|
||||
slug = models.CharField(max_length=50, unique_for_year='posted', blank=True)
|
||||
subtitle = models.CharField(max_length=50, unique_for_month='posted', blank=True)
|
||||
posted = models.DateField(blank=True, null=True)
|
||||
|
||||
class UniqueErrorsModel(models.Model):
|
||||
name = models.CharField(max_length=100, unique=True, error_messages={'unique': u'Custom unique name message.'})
|
||||
number = models.IntegerField(unique=True, error_messages={'unique': u'Custom unique number message.'})
|
||||
Reference in New Issue
Block a user