Opened 9 years ago

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

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by dummy@…

Changed 9 years ago by dummy@…

Changed 9 years ago by dummy@…

django/contrib/media/init.py

comment:1 Changed 9 years ago by anonymous

  • Summary changed from serve media files from INSTALL_APP and sync them into MEDIA_ROOT to [patch] serve media files from INSTALL_APP and sync them into MEDIA_ROOT

comment:2 Changed 9 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to 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 Changed 9 years ago by dummy@…

  • Resolution wontfix deleted
  • Status changed from closed to 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 Changed 9 years ago by adrian

  • Resolution set to wontfix
  • Status changed from reopened to closed

Hi Dirk,

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

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