summaryrefslogtreecommitdiff
path: root/docs/howto/initial-data.txt
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-11-06 10:24:24 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-11-06 10:24:24 +0000
commitfb8a7702a022e5d85398838ab1a0a797519ac9cc (patch)
treee9c9650bbaf42a674f42ee294e65bc1fa57df2a8 /docs/howto/initial-data.txt
parent82c89d0c262b7aed24866eaf0c0e33cb013f6813 (diff)
Fixed #9518 -- Corrected example JSON snippet in fixture documentation. Thanks to claude@2xlibre.net for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/howto/initial-data.txt')
-rw-r--r--docs/howto/initial-data.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/howto/initial-data.txt b/docs/howto/initial-data.txt
index b6e8a81e6a..580518b5e8 100644
--- a/docs/howto/initial-data.txt
+++ b/docs/howto/initial-data.txt
@@ -33,23 +33,23 @@ look like in JSON:
[
{
- "model": "myapp.person",
+ "model": "myapp.person",
"pk": 1,
"fields": {
"first_name": "John",
- "last_name": "Lennon",
+ "last_name": "Lennon"
}
},
{
- "model": "myapp.person",
+ "model": "myapp.person",
"pk": 2,
"fields": {
"first_name": "Paul",
- "last_name": "McCartney",
+ "last_name": "McCartney"
}
},
]
-
+
And here's that same fixture as YAML:
.. code-block:: none
@@ -64,7 +64,7 @@ And here's that same fixture as YAML:
fields:
first_name: Paul
last_name: McCartney
-
+
You'll store this data in a ``fixtures`` directory inside you app.
Loading data is easy: just call :djadmin:`manage.py loaddata fixturename