mirror of
https://github.com/django/django.git
synced 2025-06-02 10:09:12 +00:00
magic-removal: Fixed bug in custom_pk unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
765abe8f70
commit
96afbcff43
@ -169,7 +169,6 @@ class RelatedObject(object):
|
||||
self.name = self.opts.module_name
|
||||
self.var_name = self.opts.object_name.lower()
|
||||
|
||||
|
||||
def flatten_data(self, follow, obj=None):
|
||||
new_data = {}
|
||||
rel_instances = self.get_list(obj)
|
||||
@ -739,7 +738,6 @@ class Manager(object):
|
||||
# objects -- MySQL returns the values as strings, instead.
|
||||
return [typecast_timestamp(str(row[0])) for row in cursor.fetchall()]
|
||||
|
||||
|
||||
class ModelBase(type):
|
||||
"Metaclass for all models"
|
||||
def __new__(cls, name, bases, attrs):
|
||||
@ -841,7 +839,6 @@ class ModelBase(type):
|
||||
|
||||
new_class._prepare()
|
||||
|
||||
|
||||
for field in fields:
|
||||
if field.rel:
|
||||
other = field.rel.to
|
||||
@ -1233,10 +1230,6 @@ class Model(object):
|
||||
|
||||
_add_related.alters_data = True
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Handles related many-to-many object retrieval.
|
||||
# Examples: Album.get_song(), Album.get_song_list(), Album.get_song_count()
|
||||
def _get_related_many_to_many(self, method_name, rel_class, rel_field, **kwargs):
|
||||
|
@ -45,7 +45,7 @@ Fran Bones
|
||||
>>> Employee.objects.get_object(pk='foo')
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
EmployeeDoesNotExist: Employee does not exist for {'pk': 'foo'}
|
||||
DoesNotExist: Employee does not exist for {'pk': 'foo'}
|
||||
|
||||
# Fran got married and changed her last name.
|
||||
>>> fran = Employee.objects.get_object(pk='XYZ456')
|
||||
|
Loading…
x
Reference in New Issue
Block a user