Django

Code

Ticket #4783 (closed: fixed)

Opened 1 year ago

Last modified 6 months ago

documentation changes for serving static media

Reported by: klok001@gmail.com Assigned to: nobody
Milestone: Component: Documentation
Version: 0.96 Keywords: media static ADMIN_MEDIA_PREFIX
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

http://www.djangoproject.com/documentation/static_files/

In the above documentation it does not mention that for your own project you should choose a url different from ADMIN_MEDIA_PREFIX for serving static files.

Also based on the settings file and website http://www.djangoproject.com/documentation/settings/, it seemed that MEDIA_URL was related to serving static media. Perhaps changing the default comments in settings.py to better explain when MEDIA_URL is actually used, and even perhaps mentioning that static files need to be dealt with another way.

Also, ADMIN_MEDIA_PREFIX would be better explained as the "URL prefix for media in the admin project". As it stands in the settings and online documentation http://www.djangoproject.com/documentation/settings/, it is the "URL prefix for admin media". To me admin media sounds like media owned by the administrator, which could mean all media.

Finally, there are a few tricks to getting CSS files to work within a template (you might tell where I tripped up). Adding a simple explanation to the tutorial I think would save many people some time.

Thanks!

Attachments

Change History

07/06/07 04:16:09 changed by anonymous

  • needs_better_patch changed.
  • summary changed from documentation should say /media is a reserved URL to documentation changes for serving static media.
  • needs_tests changed.
  • needs_docs changed.

07/15/07 23:15:57 changed by Simon G. <dev@simon.net.nz>

  • stage changed from Unreviewed to Accepted.

Yes - please feel free to write up a first-take at this.

03/18/08 17:36:31 changed by ubernostrum

  • status changed from new to closed.
  • resolution set to fixed.

(In [7312]) Fixed #4783: Added a note that "admin media" means "media used by the admin app", and that ADMIN_MEDIA_PREFIX and MEDIA_URL should not be the same value.


Add/Change #4783 (documentation changes for serving static media)




Change Properties
Action