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: dummy@… 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)

django-admin-syncmedia.diff (1.4 KB ) - added by dummy@… 18 years ago.
basehttp-GenerellMediaHandler.diff (2.0 KB ) - added by dummy@… 18 years ago.
__init__.py (1.5 KB ) - added by dummy@… 18 years ago.
django/contrib/media/init.py

Download all attachments as: .zip

Change History (7)

by dummy@…, 18 years ago

Attachment: django-admin-syncmedia.diff added

by dummy@…, 18 years ago

by dummy@…, 18 years ago

Attachment: __init__.py added

django/contrib/media/init.py

comment:1 by anonymous, 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 Adrian Holovaty, 18 years ago

Resolution: wontfix
Status: newclosed

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 dummy@…, 18 years ago

Resolution: wontfix
Status: closedreopened

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 Adrian Holovaty, 18 years ago

Resolution: wontfix
Status: reopenedclosed

Hi Dirk,

Thanks for the contribution, but I've marked it as wontfix.

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