Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14617 closed (fixed)

Docs should mention runserver's automatic serving of static files

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

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 :)

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by jezdez

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by carljm

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 Changed 3 years ago by carljm

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

comment:4 Changed 3 years ago by jezdez

  • Resolution set to fixed
  • Status changed from assigned to closed

(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 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.