I have django 1.4 and grappelli 2.4.3 running on an Ubuntu server, which I'm viewing over a Windows networked system when in production. Everything works fine on the development server when I view it on the Ubuntu machine using RDP.
The relevant parts of settings.py are:
STATIC_ROOT = os.path.join(os.path.dirname(__file__), '../03_static_files/collected/')
STATIC_URL = '/static/'
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(os.path.dirname(__file__), '../03_static_files/'),
os.path.join(os.path.dirname(__file__), '../03_static_files/admin/'),
os.path.join(os.path.dirname(__file__), '../03_static_files/filebrowser/'),
os.path.join(os.path.dirname(__file__), '../03_static_files/grappelli/'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# apps I added but didn't create
'south',
'grappelli',
'filebrowser',
'tinymce',
'haystack',
'gunicorn',
'debug_toolbar',
'taggit',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
# apps I created
'community',
'fts',
'guidance',
'news',
)
I've run collectstatic
but the admin site is clearly only partially rendered. It's definitely picking up some CSS because some elements are styled. But it's not picking up others because it looks a mess. Neither my Nginx or Gunicorn error logs show any 404s, and I can download all the css and js files if I point my browser to them directly.
The admin site currently looks like this in both IE8 and IE9:
Everything else about the site runs fine. Django debug toolbar says the (working) development server version and the production version above are rendering identical templates. The normal django admin displays properly when grappelli is removed. I've tried changing my Nginx conf file from
location /admin/media/ {
root /path/to/django/contrib;
}
to
location /admin/media/ {
root /path/to/grappelli;
}
with no change. Can anyone tell me where I'm going wrong?