Django

Code

Ticket #2600 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] Development server doesn't serve custom admin media

Reported by: adurdin@gmail.com Assigned to: adrian
Milestone: Component: Core framework
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

If the ADMIN_MEDIA_PREFIX is set to a relative path containing customised files, and the urls.py configured to serve static files from that path, the development server (django-admin runserver) will still serve the standard admin media from django/contrib/admin/media/

The attached patch adds a setting SERVE_DEFAULT_ADMIN_MEDIA (default True), which if False will prevent this behaviour.

Attachments

SERVE_DEFAULT_ADMIN_MEDIA.diff (1.9 kB) - added by adurdin@gmail.com on 08/24/06 06:38:58.
patch
admin_media_path.diff (3.2 kB) - added by adurdin@gmail.com on 08/29/06 11:01:24.
patch that adds --adminmediapath setting to manage.py

Change History

08/24/06 06:38:58 changed by adurdin@gmail.com

  • attachment SERVE_DEFAULT_ADMIN_MEDIA.diff added.

patch

08/28/06 13:31:25 changed by adrian

  • summary changed from [patch] Development server doesn't serve custom admin media to Development server doesn't serve custom admin media.

Hmmm, I think introducing a setting for this would be overkill, because it's such an edge case. I would be more comfortable with an option to manage.py runserver, such as manage.py runserver --no-admin-media or something. Would you be willing to contribute a patch that does that?

(Removing the [patch] designation.)

08/29/06 11:01:24 changed by adurdin@gmail.com

  • attachment admin_media_path.diff added.

patch that adds --adminmediapath setting to manage.py

08/29/06 11:03:10 changed by adurdin@gmail.com

  • summary changed from Development server doesn't serve custom admin media to [patch] Development server doesn't serve custom admin media.

Apart from not using a 'settings' setting, this patch has different semantics: the option lets you specify the path to use instead of the default.

09/24/06 03:17:48 changed by mtredinnick

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

(In [3811]) Fixed #2600 -- Added an option to allow serving admin media from a custom path with dev server. Thanks, adurdin@gmail.com.

09/24/06 03:22:52 changed by mtredinnick

(In [3812]) Documented the change in r3811. Refs #2600.


Add/Change #2600 ([patch] Development server doesn't serve custom admin media)




Change Properties
Action