mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Renamed Field.rel attribute to remote_field
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
This commit is contained in:
committed by
Tim Graham
parent
f9c70bb3a1
commit
8f30556329
@@ -82,7 +82,7 @@ class PickleabilityTestCase(TestCase):
|
||||
m1 = M2MModel.objects.create()
|
||||
g1 = Group.objects.create(name='foof')
|
||||
m1.groups.add(g1)
|
||||
m2m_through = M2MModel._meta.get_field('groups').rel.through
|
||||
m2m_through = M2MModel._meta.get_field('groups').remote_field.through
|
||||
original = m2m_through.objects.get()
|
||||
dumped = pickle.dumps(original)
|
||||
reloaded = pickle.loads(dumped)
|
||||
|
||||
Reference in New Issue
Block a user