Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango-admin-tools media/CSS styles not loading
    primarykey
    data
    text
    <p>I am trying to deploy my Django project using mod_wsgi and Apache2 but I am not able to figure out why the admin CSS styles aren't loading. I have used Django-admin-tools as an App to enhance the looks of admin interface and its working pretty well on the development server but the styles problem has occurred during deployment.</p> <p>Project Path on server is :</p> <pre><code>'/srv/www/myapp/' '/srv/www/myapp/media/admin_tools/css|js|images' </code></pre> <p>setting.py contains:</p> <pre><code>MEDIA_ROOT = '/srv/www/myapp/media/' # also tried MEDIA_ROOT = '/srv/www/myapp/media/admin_tools/' MEDIA_URL = 'http://myserverip:80/media/' STATIC_ROOT = '/srv/www/myapp/static' STATIC_URL = '/static/' ADMIN_MEDIA_PREFIX = '/media/' # also tried ADMIN_MEDIA_PREFIX = '/media/admin_tools/' STATICFILES_DIRS = ( '/srv/www/myapp/projectstatic' ) TEMPLATE_DIRS = ( '/srv/www/myapp/templates' ) INSTALLED_APPS = ( 'admin_tools', 'admin_tools.theming', 'admin_tools.menu', 'admin_tools.dashboard', 'django.contrib.auth', #Many other applications ) ADMIN_TOOLS_INDEX_DASHBOARD = 'myapp.dashboard.CustomIndexDashboard' ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'myapp.dashboard.CustomAppIndexDashboard' ADMIN_TOOLS_THEMING_CSS = '/srv/www/myapp/media/admin_tools/css/theming.css' ADMIN_TOOLS_MENU = 'myapp.menu.CustomMenu' </code></pre> <p>urls.py:</p> <pre><code>urlpatterns = patterns('', url(r'^admin_tools/', include('admin_tools.urls')), ) </code></pre> <p>django.wsgi: (the path of this file is '/srv/www/myapp/apache/django.wsgi')</p> <pre><code>import os import sys path = '/srv/www/' if path not in sys.path: sys.path.insert(0, '/srv/www/') sys.path = ['/srv/www/myapp'] + sys.path sys.path.append('/usr/local/lib/python2.7/dist-packages/registration/backends') os.environ['DJANGO_SETTINGS_MODULE'] = 'myapp.settings' print &gt;&gt; sys.stderr, sys.path import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload