Opened 10 years ago

Closed 10 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: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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@… 10 years ago.
basehttp-GenerellMediaHandler.diff (2.0 KB) - added by dummy@… 10 years ago.
__init__.py (1.5 KB) - added by dummy@… 10 years ago.
django/contrib/media/init.py

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by dummy@…

Attachment: django-admin-syncmedia.diff added

Changed 10 years ago by dummy@…

Changed 10 years ago by dummy@…

Attachment: __init__.py added

django/contrib/media/init.py

comment:1 Changed 10 years ago by anonymous

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 Changed 10 years ago by Adrian Holovaty

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 Changed 10 years ago by dummy@…

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 Changed 10 years ago by Adrian Holovaty

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