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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user