Opened 18 years ago
Closed 18 years ago
#2557 closed enhancement (wontfix)
[patch] serve media files from INSTALL_APP and sync them into MEDIA_ROOT
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Contrib apps | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
the AdminMediaHandler looks into all INSTALL_APPs for media folders and serv the content in development mode. For production server a django-admin command syncmedia is created.
Regards,
Dirk
Attachments (3)
Change History (7)
by , 18 years ago
Attachment: | django-admin-syncmedia.diff added |
---|
by , 18 years ago
Attachment: | basehttp-GenerellMediaHandler.diff added |
---|
by , 18 years ago
Attachment: | __init__.py added |
---|
comment:1 by , 18 years ago
Summary: | serve media files from INSTALL_APP and sync them into MEDIA_ROOT → [patch] serve media files from INSTALL_APP and sync them into MEDIA_ROOT |
---|
comment:2 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Django isn't meant to serve media files. That task should be delegated to another server, such as Apache or lighttpd. The admin-media serving capabilities of the Django development server are intended purely for convenience.
comment:3 by , 18 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Hi Adrian,
I think you closed it a little bit to fast :(
This enhencement is intended purely for convenience! In development mode it served media files from installed apps. Think of css, js or img files in developing django apps.
To go into production the patch help to sync all media file in the installed apps into the MEDIA_ROOT folder of the media serving web server. Without the patch I had to copy all media files from the installed apps by hand into the correct MEDIA_ROOT folder and had to take care about the correct directory structure.
Regards,
Dirk
comment:4 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Hi Dirk,
Thanks for the contribution, but I've marked it as wontfix.
django/contrib/media/init.py