From ec31445c527a22a736cc769d35791f3fea9b477b Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 20 Jul 2005 17:42:36 +0000 Subject: Added '--settings' option to django-admin. This specifies which settings module to use, if you don't want to deal with setting the DJANGO_SETTINGS_MODULE environment variable. Refactored django-admin to use optparse. Updated the tutorials to use '--settings' instead of environment variables, which can be confusing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@247 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/tutorial02.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'docs/tutorial02.txt') diff --git a/docs/tutorial02.txt b/docs/tutorial02.txt index e3115eb4ad..8a760b1a1d 100644 --- a/docs/tutorial02.txt +++ b/docs/tutorial02.txt @@ -30,19 +30,16 @@ Start the development server To make things easy, Django comes with a pure-Python Web server that builds on the BaseHTTPServer included in Python's standard library. Let's start the -server and explore the admin site. First, set the ``DJANGO_SETTINGS_MODULE`` -environment variable to the location of your admin settings:: +server and explore the admin site. - export DJANGO_SETTINGS_MODULE=myproject.settings.admin +Just run the following command to start the server:: -Then, run this command to start the server:: - - django-admin.py runserver + django-admin.py runserver --settings="myproject.settings.admin" It'll start a Web server running locally -- on port 8000, by default. If you want to change the server's port, pass it as a command-line argument:: - django-admin.py runserver 8080 + django-admin.py runserver 8080 --settings="myproject.settings.admin" DON'T use this server in anything resembling a production environment. It's intended only for use while developing. -- cgit v1.3