Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added note to docs/django-admin.txt about the examples using django-a…

…dmin.txt but the examples being just as relevant for manage.py. Refs #3893

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 099022c6aac4d6879810456ab515813ff63cdedd 1 parent e34e433
Adrian Holovaty authored April 09, 2007

Showing 1 changed file with 36 additions and 32 deletions. Show diff stats Hide diff stats

  1. 68  docs/django-admin.txt
68  docs/django-admin.txt
@@ -29,6 +29,9 @@ Generally, when working on a single Django project, it's easier to use
29 29
 ``--settings`` command line option, if you need to switch between multiple
30 30
 Django settings files.
31 31
 
  32
+The command-line examples throughout this document use ``django-admin.py`` to
  33
+be consistent, but any example can use ``manage.py`` just as well.
  34
+
32 35
 Usage
33 36
 =====
34 37
 
@@ -100,23 +103,23 @@ if you're ever curious to see the full list of defaults.
100 103
 dumpdata [appname appname ...]
101 104
 ------------------------------
102 105
 
103  
-Output to standard output all data in the database associated with the named 
  106
+Output to standard output all data in the database associated with the named
104 107
 application(s).
105 108
 
106 109
 By default, the database will be dumped in JSON format. If you want the output
107  
-to be in another format, use the ``--format`` option (e.g., ``format=xml``). 
108  
-You may specify any Django serialization backend (including any user specified 
  110
+to be in another format, use the ``--format`` option (e.g., ``format=xml``).
  111
+You may specify any Django serialization backend (including any user specified
109 112
 serialization backends named in the ``SERIALIZATION_MODULES`` setting).
110 113
 
111 114
 If no application name is provided, all installed applications will be dumped.
112 115
 
113  
-The output of ``dumpdata`` can be used as input for ``loaddata``. 
  116
+The output of ``dumpdata`` can be used as input for ``loaddata``.
114 117
 
115 118
 flush
116 119
 -----
117 120
 
118  
-Return the database to the state it was in immediately after syncdb was 
119  
-executed. This means that all data will be removed from the database, any 
  121
+Return the database to the state it was in immediately after syncdb was
  122
+executed. This means that all data will be removed from the database, any
120 123
 post-synchronization handlers will be re-executed, and the ``initial_data``
121 124
 fixture will be re-installed.
122 125
 
@@ -178,37 +181,37 @@ Django will search in three locations for fixtures:
178 181
    3. In the literal path named by the fixture
179 182
 
180 183
 Django will load any and all fixtures it finds in these locations that match
181  
-the provided fixture names. 
  184
+the provided fixture names.
182 185
 
183  
-If the named fixture has a file extension, only fixtures of that type 
  186
+If the named fixture has a file extension, only fixtures of that type
184 187
 will be loaded. For example::
185 188
 
186 189
     django-admin.py loaddata mydata.json
187  
-    
188  
-would only load JSON fixtures called ``mydata``. The fixture extension 
189  
-must correspond to the registered name of a serializer (e.g., ``json`` or 
  190
+
  191
+would only load JSON fixtures called ``mydata``. The fixture extension
  192
+must correspond to the registered name of a serializer (e.g., ``json`` or
190 193
 ``xml``).
191 194
 
192  
-If you omit the extension, Django will search all available fixture types 
  195
+If you omit the extension, Django will search all available fixture types
193 196
 for a matching fixture. For example::
194 197
 
195 198
     django-admin.py loaddata mydata
196  
-    
  199
+
197 200
 would look for any fixture of any fixture type called ``mydata``. If a fixture
198 201
 directory contained ``mydata.json``, that fixture would be loaded
199  
-as a JSON fixture. However, if two fixtures with the same name but different 
200  
-fixture type are discovered (for example, if ``mydata.json`` and 
201  
-``mydata.xml`` were found in the same fixture directory), fixture 
202  
-installation will be aborted, and any data installed in the call to 
  202
+as a JSON fixture. However, if two fixtures with the same name but different
  203
+fixture type are discovered (for example, if ``mydata.json`` and
  204
+``mydata.xml`` were found in the same fixture directory), fixture
  205
+installation will be aborted, and any data installed in the call to
203 206
 ``loaddata`` will be removed from the database.
204 207
 
205  
-The fixtures that are named can include directory components. These 
  208
+The fixtures that are named can include directory components. These
206 209
 directories will be included in the search path. For example::
207 210
 
208 211
     django-admin.py loaddata foo/bar/mydata.json
209  
- 
210  
-would search ``<appname>/fixtures/foo/bar/mydata.json`` for each installed 
211  
-application,  ``<dirname>/foo/bar/mydata.json`` for each directory in 
  212
+
  213
+would search ``<appname>/fixtures/foo/bar/mydata.json`` for each installed
  214
+application,  ``<dirname>/foo/bar/mydata.json`` for each directory in
212 215
 ``FIXTURE_DIRS``, and the literal path ``foo/bar/mydata.json``.
213 216
 
214 217
 Note that the order in which fixture files are processed is undefined. However,
@@ -219,14 +222,14 @@ end of the transaction.
219 222
 
220 223
 .. admonition:: MySQL and Fixtures
221 224
 
222  
-    Unfortunately, MySQL isn't capable of completely supporting all the 
  225
+    Unfortunately, MySQL isn't capable of completely supporting all the
223 226
     features of Django fixtures. If you use MyISAM tables, MySQL doesn't
224  
-    support transactions or constraints, so you won't get a rollback if 
225  
-    multiple transaction files are found, or validation of fixture data. 
226  
-    If you use InnoDB tables, you won't be able to have any forward 
227  
-    references in your data files - MySQL doesn't provide a mechanism to 
228  
-    defer checking of row constraints until a transaction is committed.    
229  
-    
  227
+    support transactions or constraints, so you won't get a rollback if
  228
+    multiple transaction files are found, or validation of fixture data.
  229
+    If you use InnoDB tables, you won't be able to have any forward
  230
+    references in your data files - MySQL doesn't provide a mechanism to
  231
+    defer checking of row constraints until a transaction is committed.
  232
+
230 233
 reset [appname appname ...]
231 234
 ---------------------------
232 235
 Executes the equivalent of ``sqlreset`` for the given appnames.
@@ -397,8 +400,8 @@ this command to install the default apps.
397 400
 If you're installing the ``django.contrib.auth`` application, ``syncdb`` will
398 401
 give you the option of creating a superuser immediately.
399 402
 
400  
-``syncdb`` will also search for and install any fixture named ``initial_data``. 
401  
-See the documentation for ``loaddata`` for details on the specification of 
  403
+``syncdb`` will also search for and install any fixture named ``initial_data``.
  404
+See the documentation for ``loaddata`` for details on the specification of
402 405
 fixture data files.
403 406
 
404 407
 test
@@ -471,7 +474,7 @@ Example usage::
471 474
 
472 475
     django-admin.py dumpdata --indent=4
473 476
 
474  
-Specifies the number of spaces that will be used for indentation when 
  477
+Specifies the number of spaces that will be used for indentation when
475 478
 pretty-printing output. By default, output will *not* be pretty-printed.
476 479
 Pretty-printing will only be enabled if the indent option is provided.
477 480
 
@@ -512,7 +515,8 @@ and `2` is verbose output.
512 515
 ------------
513 516
 
514 517
 Example usage::
515  
-    django-admin.py manage.py --adminmedia=/tmp/new-admin-style/
  518
+
  519
+    django-admin.py --adminmedia=/tmp/new-admin-style/
516 520
 
517 521
 Tells Django where to find the various CSS and JavaScript files for the admin
518 522
 interface when running the development server. Normally these files are served

0 notes on commit 099022c

Please sign in to comment.
Something went wrong with that request. Please try again.