Explorar o código

Corrected an example in the natural key serialization docs. Thanks to Alex Gaynor for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11907 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Russell Keith-Magee %!s(int64=15) %!d(string=hai) anos
pai
achega
ebb8ca1cd7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      docs/topics/serialization.txt

+ 1 - 1
docs/topics/serialization.txt

@@ -264,7 +264,7 @@ name::
 
     class PersonManager(models.Manager):
         def get_by_natural_key(self, first_name, last_name):
-            return self.filter(first_name=first_name, last_name=last_name)
+            return self.get(first_name=first_name, last_name=last_name)
 
     class Person(models.Model):
         objects = PersonManager()