Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#2600 closed defect (fixed)

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

Reported by: adurdin@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
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

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 (2)

SERVE_DEFAULT_ADMIN_MEDIA.diff (1.9 KB ) - added by adurdin@… 18 years ago.
patch
admin_media_path.diff (3.2 KB ) - added by adurdin@… 18 years ago.
patch that adds --adminmediapath setting to manage.py

Download all attachments as: .zip

Change History (6)

by adurdin@…, 18 years ago

patch

comment:1 by Adrian Holovaty, 18 years ago

Summary: [patch] Development server doesn't serve custom admin mediaDevelopment 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.)

by adurdin@…, 18 years ago

Attachment: admin_media_path.diff added

patch that adds --adminmediapath setting to manage.py

comment:2 by adurdin@…, 18 years ago

Summary: Development server doesn't serve custom admin media[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.

comment:3 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

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

comment:4 by Malcolm Tredinnick, 17 years ago

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

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