summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-02-09 12:22:29 +0000
committerAndrew Godwin <andrew@aeracode.org>2014-02-09 12:22:59 +0000
commitd5df7a0515b08621a526a9c9ffde7d7702c5b07e (patch)
tree4a31ece48479b5f2686acf192aad856eb3b3b31e /docs
parent250841017c6c456806cadd214b4e130aa998233d (diff)
Fixed #21969: Fix behaviour of initial_data with migrated apps
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/django-admin.txt10
-rw-r--r--docs/releases/1.7.txt16
2 files changed, 26 insertions, 0 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 1fd2eb0fee..93087698a0 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -383,6 +383,16 @@ onto which the data will be loaded.
The :djadminopt:`--ignorenonexistent` option can be used to ignore fields that
may have been removed from models since the fixture was originally generated.
+
+.. versionchanged:: 1.7
+
+ ``--app`` was added.
+
+.. django-admin-option:: --app
+
+The :djadminopt:`--app` option can be used to specify a single app to look
+for fixtures in rather than looking through all apps.
+
What's a "fixture"?
~~~~~~~~~~~~~~~~~~~
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index 5cd2570552..5abc06da7e 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -59,6 +59,9 @@ but a few of the key features are:
will still work, but that method name is deprecated and you should change
it as soon as possible (nothing more than renaming is required).
+* ``initial_data`` fixtures are no longer loaded for apps with migrations; if
+ you want to load initial data for an app, we suggest you do it in a migration.
+
App-loading refactor
~~~~~~~~~~~~~~~~~~~~
@@ -714,6 +717,19 @@ For apps with migrations, ``allow_migrate`` will now get passed
without custom attributes, methods or managers. Make sure your ``allow_migrate``
methods are only referring to fields or other items in ``model._meta``.
+initial_data
+~~~~~~~~~~~~
+
+Apps with migrations will not load ``initial_data`` fixtures when they have
+finished migrating. Apps without migrations will continue to load these fixtures
+during the phase of ``migrate`` which emulates the old ``syncdb`` behaviour,
+but any new apps will not have this support.
+
+Instead, you are encouraged to load initial data in migrations if you need it
+(using the ``RunPython`` operation and your model classes);
+this has the added advantage that your initial data will not need updating
+every time you change the schema.
+
App-loading changes
~~~~~~~~~~~~~~~~~~~