Opened 19 years ago
Closed 13 years ago
#116 closed Uncategorized (worksforme)
Default admin media doesn't display for 'django-admin runserver'
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Vsevolod Novikov | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The default css and java scripts (located in '/usr/lib/python2.4/site-packages/django/conf/admin_media/') for the admin site does not work by default when I use 'django-admin.py runserver'.
Attachments (1)
Change History (8)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Summary: | Default admin media → Default admin media doesn't display for 'django-admin runserver' |
---|
comment:3 by , 19 years ago
I use Firefox 1.0.4, and everything else works, it is just everyting that is in the "media" folder.
If I try for example to open "admin/media/css/base.css" (same with "media/css/base.css") I get
There's been an error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 184, in get_response callback, param_dict = resolver.resolve(path) File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 85, in resolve raise Http404, "Tried all URL patterns but didn't find a match for %r" % app_path Http404: Tried all URL patterns but didn't find a match for 'admin/media/css/base.css'
comment:4 by , 19 years ago
Ah, the problem is that your ADMIN_MEDIA_PREFIX is set to "/admin/media", and Django handles everything under "/admin/". Set it to something like "/admin_media/", and it should work. I'll leave this ticket open, though, so we can fix this potential problem in the code -- by displaying a helpful error message or something.
comment:5 by , 19 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I got it to work now, with apache.
by , 13 years ago
Attachment: | django-admin-media-log.patch added |
---|
I've made a simple patch which allows to setup admin media logging easy. It adds optional ADMIN_MEDIA_LOG setting, and developer can see admin media requests if this settings is set to True
comment:6 by , 13 years ago
Cc: | added |
---|---|
Easy pickings: | unset |
Has patch: | set |
Needs documentation: | set |
Needs tests: | set |
Resolution: | worksforme |
Status: | closed → reopened |
Type: | defect → Uncategorized |
UI/UX: | unset |
The issue has been reopened for django developers who can apply the patch to the source
comment:7 by , 13 years ago
Needs documentation: | unset |
---|---|
Needs tests: | unset |
Resolution: | → worksforme |
Status: | reopened → closed |
Please don't reopen tickets that have been closed as WORKSFORME.
A few questions:
Which browser are you running? Does the rest of the site work (logging in, etc.)? If you point your browser directly to an admin media file, such as an image, what error do you get?