mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
This commit is contained in:
parent
749d23251b
commit
fb48eb0581
58 changed files with 2851 additions and 1195 deletions
|
@ -79,7 +79,7 @@ class PickleabilityTestCase(TestCase):
|
|||
m1 = M2MModel.objects.create()
|
||||
g1 = Group.objects.create(name='foof')
|
||||
m1.groups.add(g1)
|
||||
m2m_through = M2MModel._meta.get_field_by_name('groups')[0].rel.through
|
||||
m2m_through = M2MModel._meta.get_field('groups').rel.through
|
||||
original = m2m_through.objects.get()
|
||||
dumped = pickle.dumps(original)
|
||||
reloaded = pickle.loads(dumped)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue