Loading django/core/serializers/python.py +7 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,13 @@ def Deserializer(object_list, **options): for d in object_list: # Look up the model and starting build a dict of data for it. try: Model = _get_model(d["model"]) except base.DeserializationError as e: if ignore: continue else: raise e data = {} if 'pk' in d: data[Model._meta.pk.attname] = Model._meta.pk.to_python(d.get("pk", None)) Loading docs/ref/django-admin.txt +6 −3 Original line number Diff line number Diff line Loading @@ -383,14 +383,17 @@ onto which the data will be loaded. .. django-admin-option:: --ignorenonexistent The :djadminopt:`--ignorenonexistent` option can be used to ignore fields that may have been removed from models since the fixture was originally generated. The :djadminopt:`--ignorenonexistent` option can be used to ignore fields and models that may have been removed since the fixture was originally generated. .. versionchanged:: 1.7 ``--app`` was added. .. versionchanged:: 1.8 ``--ignorenonexistent`` also ignores non-existent models. .. django-admin-option:: --app The :djadminopt:`--app` option can be used to specify a single app to look Loading docs/releases/1.8.txt +3 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,9 @@ Management Commands :djadminopt:`--exclude` which allows exclusion of specific locales from processing. * The :djadminopt:`--ignorenonexistent` option of the :djadmin:`loaddata` management command now ignores data for models that no longer exist. Models ^^^^^^ Loading tests/fixtures_regress/fixtures/sequence_extra.json +11 −0 Original line number Diff line number Diff line Loading @@ -9,5 +9,16 @@ "count": 3, "weight": 1.2 } }, { "pk": "1", "model": "fixtures_regress.animal_extra", "fields": { "name": "Non-existent model", "extra_name": "test for ticket #21799", "latin_name": "Panthera leo", "count": 3, "weight": 1.2 } } ] Loading
django/core/serializers/python.py +7 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,13 @@ def Deserializer(object_list, **options): for d in object_list: # Look up the model and starting build a dict of data for it. try: Model = _get_model(d["model"]) except base.DeserializationError as e: if ignore: continue else: raise e data = {} if 'pk' in d: data[Model._meta.pk.attname] = Model._meta.pk.to_python(d.get("pk", None)) Loading
docs/ref/django-admin.txt +6 −3 Original line number Diff line number Diff line Loading @@ -383,14 +383,17 @@ onto which the data will be loaded. .. django-admin-option:: --ignorenonexistent The :djadminopt:`--ignorenonexistent` option can be used to ignore fields that may have been removed from models since the fixture was originally generated. The :djadminopt:`--ignorenonexistent` option can be used to ignore fields and models that may have been removed since the fixture was originally generated. .. versionchanged:: 1.7 ``--app`` was added. .. versionchanged:: 1.8 ``--ignorenonexistent`` also ignores non-existent models. .. django-admin-option:: --app The :djadminopt:`--app` option can be used to specify a single app to look Loading
docs/releases/1.8.txt +3 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,9 @@ Management Commands :djadminopt:`--exclude` which allows exclusion of specific locales from processing. * The :djadminopt:`--ignorenonexistent` option of the :djadmin:`loaddata` management command now ignores data for models that no longer exist. Models ^^^^^^ Loading
tests/fixtures_regress/fixtures/sequence_extra.json +11 −0 Original line number Diff line number Diff line Loading @@ -9,5 +9,16 @@ "count": 3, "weight": 1.2 } }, { "pk": "1", "model": "fixtures_regress.animal_extra", "fields": { "name": "Non-existent model", "extra_name": "test for ticket #21799", "latin_name": "Panthera leo", "count": 3, "weight": 1.2 } } ]