Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#14617 closed (fixed)

Docs should mention runserver's automatic serving of static files

Reported by: Chris Beaven Owned by: Jannis Leidel
Component: Documentation Version:
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Specifically, here: http://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-in-development.

I'm assigning to jezdez but I'm sure he'd appreciate anyone throwing a doc patch up :)

Change History (5)

comment:1 by Jannis Leidel, 13 years ago

Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Carl Meyer, 13 years ago

I have some documentation improvements (hopefully!) here: https://github.com/carljm/django/compare/master...staticfiles-docs

Some things I'm not satisfied with / sure about:

  1. I think staticfiles actually needs to provide a little better help in the area of serving MEDIA_URL in development than it currently does, which will mean updating the doc I wrote for that. I'll look at that more and perhaps file a separate ticket with a patch.
  1. I believe the plan is to make a change so StaticFilesHandler is only enabled if you put contrib.staticfiles in INSTALLED_APPS. Based on this, I haven't added a backwards-incompatibility note in the release notes about automatic serving of STATIC_URL, which I think would otherwise be needed. In any case, if that change is made it will need to be mentioned in the docs as well.

comment:3 by Carl Meyer, 13 years ago

This django-developers post is relevant to how this patch still needs improvement: http://groups.google.com/group/django-developers/msg/653fb09eee4d86be

comment:4 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: assignedclosed

(In [14533]) Fixed #14524, #14582, #14617, #14665 and #14667 -- 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.

comment:3 by Jacob, 12 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top