Author: russellm
Date: 2008-11-06 04:24:24 -0600 (Thu, 06 Nov 2008)
New Revision: 9355
Modified:
django/trunk/docs/howto/initial-data.txt
Log:
Fixed #9518 -- Corrected example JSON snippet in fixture documentation. Thanks
to [EMAIL PROTECTED] for the report.
Modified: django/trunk/docs/howto/initial-data.txt
===================================================================
--- django/trunk/docs/howto/initial-data.txt 2008-11-06 09:43:56 UTC (rev
9354)
+++ django/trunk/docs/howto/initial-data.txt 2008-11-06 10:24:24 UTC (rev
9355)
@@ -33,23 +33,23 @@
[
{
- "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 @@
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---