#349 closed (fixed)
[patch] Bad styling in Admin interface
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | contrib.admin | 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
Both Internet Explorer 6 and Firefox 1.0.6 (on PC) have visualization problems with Admin interface.
1) FF doesn't show default button (Save in my example). It draws it white on white making text invisible. Screenshot: http://www.lazutkin.com/ff.jpg
2) IE shows buttons but as far as I can tell while it is not shown correctly, it is visible and usable. The bigger problem is incomplete background of collapsed fieldset ("Date information" in my example). Screenshot: http://www.lazutkin.com/ie6.jpg
3) Both browsers have almost invisible text for collapsed fieldsets. See examples above.
Change History (14)
comment:1 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 19 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I'll look into this - I can at least set the fallback background colors to make the buttons and headers readable when the images don't load.
comment:3 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:4 by , 19 years ago
If my admin media files are not being loaded, it should be explained somewhere how to do it correctly. FAQ mentions MEDIA_ROOT only in unrelated context. Should I fiddle with MEDIA_URL? How to do it with "django-admin.py runserver" web server?
Nevertheless, if you look at examples again, you will see that some images are there (like red cross before "Delete"). It means that css from media directory is loaded along with the red cross image.
In any case it doesn't explain shifted background in ff. And it doesn't explain choice of color for collapsed fieldset.
comment:5 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Since there are a few separate issues here, let me respond to each of them individually
- I've modified the admin styles to make things more readable with images off See [537].
- I can't duplicate the situation you've shown where some images load and others do not in Firefox or IE on any platform.
- The issue with unstyled form buttons in IE is known. It's a cosmetic issue related to IE's lack of support for form button styling. The buttons work in IE, they're just not pretty. It's a wontfix for now.
comment:6 by , 19 years ago
Thank you. Now it is fully usable. I'll try to investigated bizarre behaviour on my own (some pictures are loaded, while some are not). If I find the reason, I'll open new ticket.
What worries me a little bit is the example was the plain vanilla tutorial Polls example, which was done according to the letter of tutorials. Tutorials are supposed to work from the first go without any hiccups.
comment:7 by , 19 years ago
Hmm. It looks like media files are sent but they are garbled.
When I try to access file directly with ff I am getting error like that:
The image “http://localhost:8000/media/img/admin/icon_searchbox.png” cannot be displayed, because it contains errors.
If I try to access non-existent file, I am getting something like that:
Page not found: C:\Projects\Django\django/conf/admin_media\img/admin/icon_searchbox_ABC.png
Which is correct.
I venture to say that "django-admin.py runserver" doesn't set correct mime type for media files and/or send them as text files. The latter case would garble images by replacing \n with \r\n on Windows platform, which is my case.
Does it help?
comment:8 by , 19 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Media files should be opened in binary mode. Seems important on Windows.
Maybe there are other places were this change is needed too ?
Index: trunk/django/core/servers/basehttp.py =================================================================== --- trunk/django/core/servers/basehttp.py (r├®vision 537) +++ trunk/django/core/servers/basehttp.py (copie de travail) @@ -623,7 +623,7 @@ output = ['Page not found: %s' % file_path] else: try: - fp = open(file_path, 'r') + fp = open(file_path, 'rb') except IOError: status = '401 UNAUTHORIZED' headers = {'Content-type': 'text/plain'}
comment:9 by , 19 years ago
I was having the same problem with runserver on Windows and the patch above for reading media files in binary mode seems to work.
comment:10 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
Summary: | Bad styling in Admin interface → [patch] Bad styling in Admin interface |
comment:11 by , 19 years ago
Status: | new → assigned |
---|
comment:13 by , 19 years ago
Type: | defect |
---|
Looks like an image problem -- your admin media files don't appear to be loading.