Ticket #8628: add_devserver_settings.patch
File add_devserver_settings.patch, 5.7 KB (added by , 16 years ago) |
---|
-
django/conf/global_settings.py
52 52 ('el', gettext_noop('Greek')), 53 53 ('en', gettext_noop('English')), 54 54 ('es', gettext_noop('Spanish')), 55 ('et', gettext_noop('Estonian')), 55 ('et', gettext_noop('Estonian')), 56 56 ('es-ar', gettext_noop('Argentinean Spanish')), 57 57 ('eu', gettext_noop('Basque')), 58 58 ('fa', gettext_noop('Persian')), … … 393 393 TEST_DATABASE_CHARSET = None 394 394 TEST_DATABASE_COLLATION = None 395 395 396 ###################### 397 # DEVELOPMENT SERVER # 398 # #################### 399 400 # Default address and port where to bind the development server 401 DEVELOPMENT_SERVER_ADDRESS = '127.0.0.1' 402 DEVELOPMENT_SERVER_PORT = '8000' 403 396 404 ############ 397 405 # FIXTURES # 398 406 ############ -
django/core/management/commands/runserver.py
20 20 import django 21 21 from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException 22 22 from django.core.handlers.wsgi import WSGIHandler 23 from django.conf import settings 24 23 25 if args: 24 26 raise CommandError('Usage is runserver %s' % self.args) 25 27 if not addrport: 26 28 addr = '' 27 port = '8000'29 port = str(settings.DEVELOPMENT_SERVER_PORT) 28 30 else: 29 31 try: 30 32 addr, port = addrport.split(':') 31 33 except ValueError: 32 34 addr, port = '', addrport 33 35 if not addr: 34 addr = '127.0.0.1'36 addr = settings.DEVELOPMENT_SERVER_ADDRESS 35 37 36 38 if not port.isdigit(): 37 39 raise CommandError("%r is not a valid port number." % port) -
docs/ref/django-admin.txt
95 95 Available subcommands 96 96 ===================== 97 97 98 cleanup 98 cleanup 99 99 ------- 100 100 101 101 **New in Django development version** … … 121 121 122 122 django-admin.py compilemessages --locale=br_PT 123 123 124 createcachetable 124 createcachetable 125 125 ---------------- 126 126 127 127 .. django-admin:: createcachetable <tablename> … … 132 132 createsuperuser 133 133 --------------- 134 134 135 .. django-admin:: createsuperuser 135 .. django-admin:: createsuperuser 136 136 137 137 **New in Django development version** 138 138 … … 181 181 .. django-admin:: diffsettings 182 182 183 183 Displays differences between the current settings file and Django's default 184 settings. 184 settings. 185 185 186 186 Settings that don't appear in the defaults are followed by ``"###"``. For 187 187 example, the default settings don't define ``ROOT_URLCONF``, so … … 431 431 Use the ``--domain`` or ``-d`` option to change the domain of the messages files. 432 432 Currently supported: 433 433 434 * ``django`` for all ``*.py`` and ``*.html`` files (default) 434 * ``django`` for all ``*.py`` and ``*.html`` files (default) 435 435 * ``djangojs`` for ``*.js`` files 436 436 437 437 --verbosity … … 546 546 547 547 django-admin.py runserver 1.2.3.4:7000 548 548 549 You could also set the default address and port values by changing 550 :setting:`DEVELOPMENT_SERVER_ADDRESS` and :setting:`DEVELOPMENT_SERVER_PORT` in 551 your settings respectively. 552 549 553 Serving static files with the development server 550 554 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 551 555 … … 879 883 880 884 881 885 882 See :ref:`howto-custom-management-commands` for how to add customized actions. 886 See :ref:`howto-custom-management-commands` for how to add customized actions. -
docs/ref/settings.txt
224 224 default port. Not used with SQLite. 225 225 226 226 .. setting:: DATABASE_USER 227 227 228 228 DATABASE_USER 229 229 ------------- 230 230 … … 247 247 and ``MONTH_DAY_FORMAT``. 248 248 249 249 .. setting:: DATETIME_FORMAT 250 250 251 251 DATETIME_FORMAT 252 252 --------------- 253 253 … … 361 361 Default tablespace to use for indexes on fields that don't specify 362 362 one, if the backend supports it. 363 363 364 .. setting:: DEVELOPMENT_SERVER_ADDRESS 365 366 DEVELOPMENT_SERVER_ADDRESS 367 -------------------------- 368 369 **New in Django development version** 370 371 Default: ``'127.0.0.1'`` 372 373 Address where to bind the built in development server by default. 374 375 .. setting:: DEVELOPMENT_SERVER_PORT 376 377 DEVELOPMENT_SERVER_PORT 378 ----------------------- 379 380 **New in Django development version** 381 382 Default: ``'8000'`` 383 384 Port where to bind the built in development server by default. 385 364 386 .. setting:: DISALLOWED_USER_AGENTS 365 387 366 388 DISALLOWED_USER_AGENTS … … 513 535 .. warning:: 514 536 515 537 **Always prefix the mode with a 0.** 516 538 517 539 If you're not familiar with file modes, please note that the leading 518 540 ``0`` is very important: it indicates an octal number, which is the 519 541 way that modes must be specified. If you try to use ``644``, you'll 520 542 get totally incorrect behavior. 521 522 543 523 .. _documentation for os.chmod: http://docs.python.org/lib/os-file-dir.html524 544 545 .. _documentation for os.chmod: http://docs.python.org/lib/os-file-dir.html 546 525 547 .. setting:: FIXTURE_DIRS 526 548 527 549 FIXTURE_DIRS … … 1157 1179 Django cannot reliably use alternate time zones in a Windows environment. 1158 1180 If you're running Django on Windows, this variable must be set to match the 1159 1181 system timezone. 1160 1182 1161 1183 .. _See available choices: http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE 1162 1184 1163 1185 .. setting:: URL_VALIDATOR_USER_AGENT