mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
* 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
This commit is contained in:
parent
216fdfab61
commit
8e96584f63
14 changed files with 190 additions and 78 deletions
|
@ -681,6 +681,31 @@ Example usage::
|
|||
|
||||
django-admin.py runserver --noreload
|
||||
|
||||
.. django-admin-option:: --nostatic
|
||||
|
||||
Use the ``--nostatic`` option to disable serving of static files with the
|
||||
:doc:`staticfiles </ref/contrib/staticfiles>` app entirely.
|
||||
|
||||
Example usage::
|
||||
|
||||
django-admin.py runserver --nostatic
|
||||
|
||||
.. django-admin-option:: --insecure
|
||||
|
||||
Use the ``--insecure`` option to force serving of static files with the
|
||||
:doc:`staticfiles </ref/contrib/staticfiles>` app even if the :setting:`DEBUG`
|
||||
setting is ``False``. By using this you acknoledge the fact that it's
|
||||
**grossly inefficient** and probably **insecure**. This is only intended for
|
||||
local development, and should **never be used in production**.
|
||||
|
||||
See the :doc:`reference documentation of the app </ref/contrib/staticfiles>`
|
||||
for more details and learn how to :doc:`manage and deploy static files
|
||||
</howto/static-files>` correctly.
|
||||
|
||||
Example usage::
|
||||
|
||||
django-admin.py runserver --insecure
|
||||
|
||||
Examples of using different ports and addresses
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue