summaryrefslogtreecommitdiff
path: root/docs/django-admin.txt
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-08-17 15:05:54 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-08-17 15:05:54 +0000
commitfcec755f01cfaba2a85bfc9511876debbce98631 (patch)
treee990effbcd90e4d405b0f9dcc70cb38e47b6f3dc /docs/django-admin.txt
parent0f92ac52cbf81fb2ac01755c558e2e6ad54700e8 (diff)
newforms-admin: Merged from trunk up to [5916]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@5918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/django-admin.txt')
-rw-r--r--docs/django-admin.txt42
1 files changed, 41 insertions, 1 deletions
diff --git a/docs/django-admin.txt b/docs/django-admin.txt
index ad17907b5e..aea990c5dc 100644
--- a/docs/django-admin.txt
+++ b/docs/django-admin.txt
@@ -235,6 +235,7 @@ The ``dumpdata`` command can be used to generate input for ``loaddata``.
reset [appname appname ...]
---------------------------
+
Executes the equivalent of ``sqlreset`` for the given appnames.
runfcgi [options]
@@ -426,7 +427,46 @@ test
Discover and run tests for all installed models. See `Testing Django applications`_ for more information.
-.. _testing django applications: ../testing/
+.. _testing Django applications: ../testing/
+
+testserver [fixture fixture ...]
+--------------------------------
+
+**New in Django development version**
+
+Runs a Django development server (as in ``runserver``) using data from the
+given fixture(s).
+
+For example, this command::
+
+ django-admin.py testserver mydata.json
+
+...would perform the following steps:
+
+ 1. Create a test database, as described in `testing Django applications`_.
+ 2. Populate the test database with fixture data from the given fixtures.
+ (For more on fixtures, see the documentation for ``loaddata`` above.)
+ 3. Runs the Django development server (as in ``runserver``), pointed at
+ this newly created test database instead of your production database.
+
+This is useful in a number of ways:
+
+ * When you're writing `unit tests`_ of how your views act with certain
+ fixture data, you can use ``testserver`` to interact with the views in
+ a Web browser, manually.
+
+ * Let's say you're developing your Django application and have a "pristine"
+ copy of a database that you'd like to interact with. You can dump your
+ database to a fixture (using the ``dumpdata`` command, explained above),
+ then use ``testserver`` to run your Web application with that data. With
+ this arrangement, you have the flexibility of messing up your data
+ in any way, knowing that whatever data changes you're making are only
+ being made to a test database.
+
+Note that this server can only run on the default port on localhost; it does
+not yet accept a ``host`` or ``port`` parameter.
+
+.. _unit tests: ../testing/
validate
--------