summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-11-26 13:33:53 +0000
committerJannis Leidel <jannis@leidel.info>2010-11-26 13:33:53 +0000
commit6a32e253f68b62b75d787f698ebaef461886c21c (patch)
tree4cc1fdd918c9134fe3a7e39ed143bfaab43055ca /docs
parent132afbf8eee837b6fe2d051f7eced4889e19de88 (diff)
Fixed #7735 -- Added support for IPv6 adresses to runserver and testserver management command. Thanks to Jason Alonso and Łukasz Rekucki for the report and initial patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/man/django-admin.15
-rw-r--r--docs/ref/django-admin.txt49
2 files changed, 43 insertions, 11 deletions
diff --git a/docs/man/django-admin.1 b/docs/man/django-admin.1
index f9b530a77e..73815ef68b 100644
--- a/docs/man/django-admin.1
+++ b/docs/man/django-admin.1
@@ -75,7 +75,7 @@ Runs this project as a FastCGI application. Requires flup. Use
.B runfcgi help
for help on the KEY=val pairs.
.TP
-.BI "runserver [" "\-\-noreload" "] [" "\-\-nostatic" "] [" "\-\-insecure" "] [" "\-\-adminmedia=ADMIN_MEDIA_PATH" "] [" "port|ipaddr:port" "]"
+.BI "runserver [" "\-\-noreload" "] [" "\-\-nostatic" "] [" "\-\-insecure" "] [" "\-\-ipv6" "] [" "\-\-adminmedia=ADMIN_MEDIA_PATH" "] [" "port|ipaddr:port" "]"
Starts a lightweight Web server for development.
.TP
.BI "shell [" "\-\-plain" "]"
@@ -170,6 +170,9 @@ Disable automatic serving of static files from STATIC_URL.
.I \-\-insecure
Enables serving of static files even if DEBUG is False.
.TP
+.I \-\-ipv6
+Enables IPv6 addresses.
+.TP
.I \-\-verbosity=VERBOSITY
Verbosity level: 0=minimal output, 1=normal output, 2=all output.
.TP
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index ea49e2372d..eeb5fee911 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -630,7 +630,7 @@ runserver [port or ipaddr:port]
.. django-admin:: runserver
Starts a lightweight development Web server on the local machine. By default,
-the server runs on port 8000 on the IP address 127.0.0.1. You can pass in an
+the server runs on port 8000 on the IP address ``127.0.0.1``. You can pass in an
IP address and port number explicitly.
If you run this script as a user with normal privileges (recommended), you
@@ -654,10 +654,15 @@ them to standard output, but it won't stop the server.
You can run as many servers as you want, as long as they're on separate ports.
Just execute ``django-admin.py runserver`` more than once.
-Note that the default IP address, 127.0.0.1, is not accessible from other
+Note that the default IP address, ``127.0.0.1``, is not accessible from other
machines on your network. To make your development server viewable to other
machines on the network, use its own IP address (e.g. ``192.168.2.1``) or
-``0.0.0.0``.
+``0.0.0.0`` or ``::`` (with IPv6 enabled).
+
+.. versionchanged:: 1.3
+
+You can also provide an IPv6 address surrounded by brackets
+(eg. ``[200a::1]:8000``). This will automaticaly enable IPv6 support.
.. django-admin-option:: --adminmedia
@@ -681,25 +686,49 @@ Example usage::
django-admin.py runserver --noreload
+.. django-admin-option:: --ipv6, -6
+
+.. versionadded:: 1.3
+
+Use the ``--ipv6`` (or shorter ``-6``) option to tell Django to use IPv6 for
+the development server. This changes the default IP address from
+``127.0.0.1`` to ``::1``.
+
+Example usage::
+
+ django-admin.py runserver --ipv6
+
Examples of using different ports and addresses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Port 8000 on IP address 127.0.0.1::
+Port 8000 on IP address ``127.0.0.1``::
- django-admin.py runserver
+ django-admin.py runserver
-Port 8000 on IP address 1.2.3.4::
+Port 8000 on IP address ``1.2.3.4``::
- django-admin.py runserver 1.2.3.4:8000
+ django-admin.py runserver 1.2.3.4:8000
-Port 7000 on IP address 127.0.0.1::
+Port 7000 on IP address ``127.0.0.1``::
django-admin.py runserver 7000
-Port 7000 on IP address 1.2.3.4::
+Port 7000 on IP address ``1.2.3.4``::
django-admin.py runserver 1.2.3.4:7000
+Port 8000 on IPv6 address ``::1``::
+
+ django-admin.py runserver -6
+
+Port 7000 on IPv6 address ``::1``::
+
+ django-admin.py runserver -6 7000
+
+Port 7000 on IPv6 address ``2001:0db8:1234:5678::9``::
+
+ django-admin.py runserver [2001:0db8:1234:5678::9]:7000
+
Serving static files with the development server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -963,7 +992,7 @@ templates.
.. django-admin-option:: --addrport [port number or ipaddr:port]
Use ``--addrport`` to specify a different port, or IP address and port, from
-the default of 127.0.0.1:8000. This value follows exactly the same format and
+the default of ``127.0.0.1:8000``. This value follows exactly the same format and
serves exactly the same function as the argument to the ``runserver`` command.
Examples: