Why don't Django admin “Today” and “Now” buttons show up in Safari?

By : mipadi
Source: Stackoverflow.com

I'm developing a Django application that contains a model with a date/time field. On my local copy of the application, the admin page for that particular model shows this for the date/time field:

alt text

This is as expected. However, when I deploy to my webserver and use the application from there, I get this:

alt text

The application on the server is exactly the same as my local copy, except that I have debugging disabled on the server (but I don't think that should matter...should it?). Why does the admin app on the server differ from the local admin app?


  • The issue seems localized to Safari. The "Today" and "Now" buttons appear when the admin site is accessed via Firefox. It looks like Safari can't download some of the JavaScript files necessary to show these widgets (strange that Firefox can, though).
  • I noticed that Safari is receiving a "304 Not Modified" code for the following files, but I'm not sure what that means, or how to fix it. Obviously, these are the JavaScript files and images that control the date/time widget:
    • RelatedObjectLookup.js
    • DateTimeShortcuts.js
    • icon_calendar.gif
    • icon_clock.gif
By : mipadi


I think you have to look at what is different between your firefox configuration and safary config

Off the top of my head:

  • One could be configured to use a proxy (messing with the trafic) the other not. Make sure the configuration is the same in both.

  • Safari could have cached the error clear the cache before testing again.

  • Try to access the gif files directly from the browser (by inputting the full url of the images) and run wireshark on the wire comparing both GET requests and responses. Something WILL be different that will help you to track the problem.

By : Pat

If you're getting 304 on those files. Flush your browser's cache and try again.

If it doesn't load again anyway, make sure you are getting 200 OK.

By : muhuk

Have you tried checking out firebug's NET tab to see if the admin javascript/css/image files are all loading correctly?

I had that problem once.

Compare all those files from the dev server against the production server.

By : bchhun

This video can help you solving your question :)
By: admin