mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +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
|
|
@ -198,7 +198,7 @@ class ForeignKeyTests(test.TestCase):
|
|||
self.assertEqual(warnings, expected_warnings)
|
||||
|
||||
def test_related_name_converted_to_text(self):
|
||||
rel_name = Bar._meta.get_field_by_name('a')[0].rel.related_name
|
||||
rel_name = Bar._meta.get_field('a').rel.related_name
|
||||
self.assertIsInstance(rel_name, six.text_type)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue