Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/core/management/commands/runserver.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #24704 -- Made the autoreloader survive SyntaxErrors.Aymeric Augustin2015-08-291-0/+4
| | | | | | | | | | | | | | | | | With this change, it's expected to survive anything except errors that make it impossible to import the settings. It's too complex to fallback to a sensible behavior with a broken settings module. Harcoding things about runserver in ManagementUtility.execute is atrocious but it's the only way out of the chicken'n'egg problem: the current implementation of the autoreloader primarily watches imported Python modules -- and then a few other things that were bolted on top of this design -- but we want it to kick in even if the project contains import-time errors and django.setup() fails. At some point we should throw away this code and replace it by an off-the-shelf autoreloader that watches the working directory and re-runs `django-admin runserver` whenever something changes.
* Fixed #24742 -- Made runserver.check_migrations ignore ↵Claude Paroz2015-05-131-5/+13
| | | | | | | read-only databases Thanks Luis Del Giudice for the report, and Aymeric Augustin and Markus Holtermann for the reviews.
* Allowed runserver sublcasses to easily override the ↵Matt Robenolt2015-05-121-2/+4
| | | | default port.
* Made runserver use leave_locale_aloneClaude Paroz2015-03-091-10/+4
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-7/+6
|
* Refs #16905 -- Replaced call to removed method in runserverR3v1L2015-01-191-1/+1
| | | | Regression introduced in 0f169098efd099fd7ae13bd8e14b798530d74da7
* Tweaked fix for refs #23946; thanks Claude.Tim Graham2014-12-021-2/+2
|
* Fixed #23946 -- Fixed runserver crash when socket error ↵Andriy Sokolovskiy2014-12-021-2/+2
| | | | contains Unicode chars.
* Fixed #23107 -- Made runserver output respect --no-color.Loic Bistuer2014-10-211-0/+8
| | | | | | | | | | | | | | | This commit reverts 67d7da5fb9498b811f0168f5df2308ad4743027f. The previous fix changed the environment globally, which meant that any call to `call_command(no_color=True)` prevented further `call_command` with color. This fix still relies on the environment because it's currently the only way to reach WSGIRequestHandler, but it's now limited to the `runserver` command. This seems an acceptable compromise considering `runserver` runs indefinitely. Thanks Tim Graham for the review.
* Limited lines to 119 characters in django/Tim Graham2014-09-051-1/+3
| | | | refs #23395.
* Fixed #23265 -- Used system-specific encoding in runserverClaude Paroz2014-08-141-1/+2
| | | | Thanks SpaceFox for the report.
* Converted remaining management commands to argparseClaude Paroz2014-06-141-20/+18
|
* Fixed several typos in DjangoAlex Gaynor2014-05-291-1/+1
|
* Fixed #21856: Don't crash runserver when DATABASES = {}Andrew Godwin2014-02-121-1/+5
|
* Reverting unapplied migrations check away from being a ↵Andrew Godwin2014-02-121-0/+14
| | | | | | system-level check. This reverts commit 0ac13eccebb3d879f79b31585b1e81f655067179.
* Remove check_migrations from the runserver command and ↵mlavin2014-02-081-14/+0
| | | | use the new checks framework to check for unapplied migrations. Don't check for migrations if the DATABASES setting is empty.
* Fixed #16905 -- Added extensible checks (nee validation) ↵Russell Keith-Magee2014-01-201-2/+2
| | | | | | | | | | | framework This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.
* Migrate prompts if you need makemigrations, runserver ↵Andrew Godwin2013-12-041-1/+13
| | | | prompts for migrate
* Fixed #21358 -- Allowed runserver on non-English localesClaude Paroz2013-11-301-1/+8
| | | | Thanks svartalf for the report.
* Fixed "Address already in use" from liveserver.Florian Apolloner2013-09-221-7/+8
| | | | | | | | | | | | | Our WSGIServer rewrapped the socket errors from server_bind into WSGIServerExceptions, which is used later on to provide nicer error messages in runserver and used by the liveserver to see if the port is already in use. But wrapping server_bind isn't enough since it only binds to the socket, socket.listen (which is called from server_activate) could also raise "Address already in use". Instead of overriding server_activate too I chose to just catch socket errors, which seems to make more sense anyways and should be more robust against changes in wsgiref.
* Added runserver validation to detect if DEBUG=False and ↵Tim Graham2013-06-091-0/+5
| | | | | | ALLOWED_HOSTS is empty. Refs #19875.
* Replaced `and...or...` constructs with PEP 308 ↵Ramiro Morales2013-05-271-1/+1
| | | | conditional expressions.
* Replaced an antiquated pattern.Aymeric Augustin2013-05-171-2/+2
| | | | Thanks Lennart Regebro for pointing it out.
* Avoided ambiguous output when runserver port is already ↵Aymeric Augustin2013-02-011-1/+1
| | | | | | in use. Thanks James Pic for the suggestion (PR 88).
* Fixed error output from runserverClaude Paroz2012-10-101-1/+1
| | | | This has been missed in commit 822d6d6dab (Refs #18325).
* Fixed #18611 -- Display current date/time when running ↵Mike Grouchy2012-09-101-0/+3
| | | | runserver
* Fixed #18325 -- Wrapped self.stdout/stderr in ↵Claude Paroz2012-05-191-2/+2
| | | | OutputWrapper class
* Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz2012-04-291-1/+1
| | | | | Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
* Fixed #18035 -- Removed deprecated AdminMediaHandler, as ↵Claude Paroz2012-04-081-13/+4
| | | | | | per official deprecation timeline. Thanks Jannis Leidel and Ramiro Morales for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #17820 -- Fixed more occurrences of redundant ↵Ramiro Morales2012-03-101-2/+2
| | | | | | | | | | handling of management commands options. They had been missen in the first attempts or had been introduced afterwards. Refs #13760, #10080, #17799. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13760 -- Cleaned up unnecessary default option ↵Julien Phalip2011-10-231-1/+1
| | | | | | handling in a bunch of management commands. Thanks to Paul McMillan for the report and to adamv and Claude Paroz for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16360 -- Added WSGI entrypoint to startproject ↵Carl Meyer2011-10-221-3/+2
| | | | | | layout, and enabled internal servers (runserver and runfcgi) to use an externally-defined WSGI application. Thanks to Armin Ronacher, Jannis Leidel, Alex Gaynor, ptone, and Jacob Kaplan-Moss. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed help message introduced in r16427.Jannis Leidel2011-06-171-1/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@16428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16099 -- Enabled threading for the runserver ↵Jannis Leidel2011-06-171-1/+6
| | | | | | management command and added a --nothreading option to disable it if needed. This should help Google Chrome users because it opens more than one connection speculatively. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15112 -- Ensure that IPv6 addresses are correctly ↵Russell Keith-Magee2011-01-271-0/+1
| | | | | | displayed in the admin. Thanks to oxy for the report, and Łukasz Rekucki for the test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14928 -- Ensure that a fully qualified domain ↵Russell Keith-Magee2011-01-151-9/+15
| | | | | | name can be used for runserver. Thanks to Karmel Allison for the report, Łukasz Rekucki for the patch, and claudep for the tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7735 -- Added support for IPv6 adresses to ↵Jannis Leidel2010-11-261-12/+28
| | | | | | 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
* Refactored runserver command and moved code related to ↵Jannis Leidel2010-11-131-68/+83
| | | | | | staticfiles to a subclass that is enabled if staticfiles app is installed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed a few typos introduced in r14533.Jannis Leidel2010-11-131-1/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@14552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14524, #14582, #14617, #14665 and #14667 -- ↵Jannis Leidel2010-11-111-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tweaked staticfiles app. * Updated StaticFilesHandler and AdminMediaHandler to make use of the 404 handler if needed. * Updated runserver management command to serve static files only in DEBUG mode (or if specified the --insecure option) and if the staticfiles app is in INSTALLED_APPS. Also added an option to disable serving completely (--nostatic). * Added check in debug mode if STATICFILES_* settings are different to MEDIA_* settings. * Removed a faulty PendingDeprecationWarning in AdminMediaHandler that is triggered every time runserver is used. * Fixed an issue with the modification time checks when running collectstatic. * Extended and refined documentation. Thanks to everyone for input, especially to Carl Meyer, Ted Kaemming and Adam Vandenberg for patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12323 and #11582 -- Extended the ability to ↵Jannis Leidel2010-10-201-2/+8
| | | | | | handle static files. Thanks to all for helping with the original app, the patch, documentation and general support. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* SECURITY ALERT: Corrected a problem with the Admin media ↵Russell Keith-Magee2009-07-291-2/+1
| | | | | | | | handler that could lead to the exposure of system files. Thanks to Gary Wilson for the patch. This is a security-related update. A full announcement, as well as backports for 1.0.X and 0.96.X will be forthcoming. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8702 -- Set up the initial locale correctly for ↵Malcolm Tredinnick2008-08-301-0/+8
| | | | | | | | | | the development server. Previously, "--noreload" wasn't picking up the default language setting. Thanks to arien and Karen Tracey for debugging this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed unneeded use of `len()` in a couple expressions.Gary Wilson Jr2007-10-131-1/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@6483 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5369 -- Refactored the django-admin.py help ↵Adrian Holovaty2007-09-091-1/+8
| | | | | | system, allowing each subcommand to register its own options. Thanks for the patch, Todd O'Bryan git-svn-id: http://code.djangoproject.com/svn/django/trunk@6075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed 'validate' and 'runserver' management commands ↵Adrian Holovaty2007-08-271-1/+1
| | | | | | to display the number of errors. This was previous behavior before the management.py refactoring git-svn-id: http://code.djangoproject.com/svn/django/trunk@6022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5224 -- Corrected name of admin media option in ↵Russell Keith-Magee2007-08-251-2/+2
| | | | | | management runserver command. Thanks for the report, alberto@ingparo.it. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6001 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added shutdown_message to runserver command -- a hook ↵Adrian Holovaty2007-08-171-0/+3
| | | | | | for specifying a message to display after the server is shut down git-svn-id: http://code.djangoproject.com/svn/django/trunk@5911 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Improved error handling for management.py commands, ↵Russell Keith-Magee2007-08-161-1/+3
| | | | | | especially for no argument or non-applabel argument commands. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Major refactoring of django.core.management -- it's now ↵Adrian Holovaty2007-08-161-0/+65
a package rather than a 1730-line single module. All django-admin/manage.py commands are now stored in separate modules. This is backwards-incompatible for people who used django.core.management functions directly git-svn-id: http://code.djangoproject.com/svn/django/trunk@5898 bcc190cf-cafb-0310-a4f2-bffc1f526a37