mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Removed the _-prefix for populate().
Several parts of Django call get_apps() with a comment along this lines of "this has the side effect of calling _populate()". I fail to see how this is better than just calling populate()!
This commit is contained in:
@@ -137,10 +137,9 @@ class Deserializer(six.Iterator):
|
||||
self.stream = six.StringIO(stream_or_string)
|
||||
else:
|
||||
self.stream = stream_or_string
|
||||
# hack to make sure that the models have all been loaded before
|
||||
# deserialization starts (otherwise subclass calls to get_model()
|
||||
# and friends might fail...)
|
||||
app_cache.get_apps()
|
||||
# Make sure the app cache is loaded before deserialization starts
|
||||
# (otherwise subclass calls to get_model() and friends might fail...)
|
||||
app_cache.populate()
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
@@ -88,7 +88,8 @@ def Deserializer(object_list, **options):
|
||||
db = options.pop('using', DEFAULT_DB_ALIAS)
|
||||
ignore = options.pop('ignorenonexistent', False)
|
||||
|
||||
app_cache.get_apps()
|
||||
app_cache.populate()
|
||||
|
||||
for d in object_list:
|
||||
# Look up the model and starting build a dict of data for it.
|
||||
Model = _get_model(d["model"])
|
||||
|
||||
Reference in New Issue
Block a user