1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed pk uniqueness validation for new objects created outside of a ModelForm. Also removed need for ModelForm to poke at Model._state.adding, keeping it an internal ORM concern.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Carl Meyer
2010-11-18 23:29:58 +00:00
parent 38ba3775ec
commit 008f333bac
5 changed files with 20 additions and 6 deletions

View File

@@ -58,6 +58,8 @@ class BrokenUnicodeMethod(models.Model):
# object).
return 'Názov: %s' % self.name
class NonAutoPK(models.Model):
name = models.CharField(max_length=10, primary_key=True)
__test__ = {'API_TESTS': """
(NOTE: Part of the regression test here is merely parsing the model