mirror of https://github.com/django/django.git
'django-admin runserver' now displays the settings module you're using when it starts up
git-svn-id: http://code.djangoproject.com/svn/django/trunk@240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
45c334dd8b
commit
2012f7df63
|
@ -375,10 +375,12 @@ def runserver(port):
|
||||||
"Starts a lightweight Web server for development."
|
"Starts a lightweight Web server for development."
|
||||||
from django.core.servers.basehttp import run, WSGIServerException
|
from django.core.servers.basehttp import run, WSGIServerException
|
||||||
from django.core.handlers.wsgi import AdminMediaHandler, WSGIHandler
|
from django.core.handlers.wsgi import AdminMediaHandler, WSGIHandler
|
||||||
|
from django.conf.settings import SETTINGS_MODULE
|
||||||
if not port.isdigit():
|
if not port.isdigit():
|
||||||
sys.stderr.write("Error: %r is not a valid port number.\n" % port)
|
sys.stderr.write("Error: %r is not a valid port number.\n" % port)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print "Starting server on port %s. Go to http://127.0.0.1:%s/ for Django." % (port, port)
|
print "Starting server on port %s with settings module %r." % (port, SETTINGS_MODULE)
|
||||||
|
print "Go to http://127.0.0.1:%s/ for Django." % port
|
||||||
try:
|
try:
|
||||||
run(int(port), AdminMediaHandler(WSGIHandler()))
|
run(int(port), AdminMediaHandler(WSGIHandler()))
|
||||||
except WSGIServerException, e:
|
except WSGIServerException, e:
|
||||||
|
|
Loading…
Reference in New Issue