0

I'm trying to install django-admin-tools in my existing Django installation. So far so good except for the fact that the backend looks fuzzy and afters some inspection it seems that utils.js is missing:

Errors in browser

If I look into my static directory (after running python manage.py collectstatic) the file simply isn't there (it is in the installed Python package so I don't know if it's supposed to be there anyway but it might be a clue)

I think the problem might be related with my configuration, here some snippets of it:

MEDIA_URL = '/'
STATIC_ROOT = os.path.join('static')
STATIC_URL = '/static/'
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]

INSTALLED_APPS = (
    'admin_tools.theming',
    'admin_tools.menu',
    'admin_tools.dashboard',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'rest_framework',
    'blog',
)

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
        ],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.contrib.auth.context_processors.auth',
                'django.template.context_processors.debug',
                'django.template.context_processors.i18n',
                'django.template.context_processors.media',
                'django.template.context_processors.static',
                'django.template.context_processors.tz',
                'django.contrib.messages.context_processors.messages',
                'django.core.context_processors.request',
                'django.core.context_processors.static',
            ],
        },
    },
]

Django is 1.8.1

I'm wondering if anyone has some suggestions to fix this.

Sven van de Scheur
  • 1,809
  • 2
  • 15
  • 31

1 Answers1

0

I've managed to fix this so for possible future readers:

The documentation (http://django-admin-tools.readthedocs.org/en/latest/configuration.html) states that django-admin-tools is modular. I thought that configuring installed apps with the above configuration was correct, it wasn't.

Although all the installed components seemed to work. Collectstatic probably couldn't find all the required files (files that belong to the base 'admin-tools' app).

The solution was to add 'admin-tools' to installed_apps so it looks like:

INSTALLED_APPS = (
    'admin_tools',
    'admin_tools.theming',
    'admin_tools.menu',
    'admin_tools.dashboard',
    (...)
)
Sven van de Scheur
  • 1,809
  • 2
  • 15
  • 31