mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +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:
committed by
Tim Graham
parent
749d23251b
commit
fb48eb0581
@@ -337,7 +337,12 @@ class Apps(object):
|
||||
|
||||
This is mostly used in tests.
|
||||
"""
|
||||
# Call expire cache on each model. This will purge
|
||||
# the relation tree and the fields cache.
|
||||
self.get_models.cache_clear()
|
||||
if self.ready:
|
||||
for model in self.get_models(include_auto_created=True):
|
||||
model._meta._expire_cache()
|
||||
|
||||
### DEPRECATED METHODS GO BELOW THIS LINE ###
|
||||
|
||||
|
||||
Reference in New Issue
Block a user