#16050 closed Cleanup/optimization (fixed)
media directory still lives on in /django/contrib/admin
Reported by: | Daniele Procida | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Shouldn't that go into /static now?
If it does, http://code.djangoproject.com/browser/django/trunk/django/contrib/staticfiles/storage.py#L47 won't be required any longer.
Change History (6)
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
UI/UX: | unset |
---|
comment:3 by , 14 years ago
Has patch: | set |
---|---|
Needs documentation: | set |
Needs tests: | set |
follow-up: 6 comment:5 by , 13 years ago
If you are using Apache to proxy to the Django admin interface (to enable the admin interface to be served under a different HTTPS host, for example), what do you suggest doing now that ADMIN_MEDIA_PREFIX has been removed?
e.g. https://secure.example.org/net-admin/ proxies internally to http://example.net/admin/ (and /admin/ is restricted to internal IPs only). STATIC_URL is set to /static/ so that it works fine for everything on the front end, but this then does not work as secure.example.org/static/ does not exist. If STATIC_URL is set to an absolute value of http://example.net/static/, then the admin will correctly give mixed HTTPS/HTTP warnings. There appear to be a lot of templates that would need overriding, so that doesn't seem like a good way to go. We use this set up on a number of sites, so it would be good if there was a simple way it could be continued.
comment:6 by , 13 years ago
Replying to anonymous:
If you are using Apache to proxy to the Django admin interface (to enable the admin interface to be served under a different HTTPS host, for example), what do you suggest doing now that ADMIN_MEDIA_PREFIX has been removed?
e.g. https://secure.example.org/net-admin/ proxies internally to http://example.net/admin/ (and /admin/ is restricted to internal IPs only). STATIC_URL is set to /static/ so that it works fine for everything on the front end, but this then does not work as secure.example.org/static/ does not exist. If STATIC_URL is set to an absolute value of http://example.net/static/, then the admin will correctly give mixed HTTPS/HTTP warnings. There appear to be a lot of templates that would need overriding, so that doesn't seem like a good way to go. We use this set up on a number of sites, so it would be good if there was a simple way it could be continued.
Seems like the solution is to set up your front-end proxy to also proxy the admin static assets under https://secure.example.org/net-admin/static/admin/.
In any case, this question should be discussed on the django-users mailing list, not on a closed ticket.
See https://github.com/jezdez/django/compare/feature/admin-media-move for the current status
and https://github.com/jezdez/django/compare/feature/admin-media-move.diff for a patch (Trac limits size)