0

I have installed and configured django-admin-tools-stats as mentioned on https://django-admin-tools-stats.readthedocs.io/en/latest/index.html

However I can not generate any graph, or no widget for graphs is visible on my admin interface.

My settings.py

INSTALLED_APPS = (
#Admin Dashboard
'admin_tools',
'admin_tools.theming',
'admin_tools.menu',
'admin_tools.dashboard',
#For the admin interface statistics
'admin_tools_stats',
'django_nvd3',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.admin',
'rest_framework',
#Rest-auth
'rest_framework.authtoken',
'rest_auth',
#Rest-auth registration
'allauth',
'allauth.account',
'rest_auth.registration',
#Following is added to allow cross domain requests i.e. for serving requests those are coming from frontend app 
'corsheaders',
#Admin reg stats
'admin_user_stats',
'chart_tools',
#'djangobower',
'flights',
)  

TEMPLATES = [
{  
    'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [],
    #'APP_DIRS': True,
    'OPTIONS': {
        'context_processors': [
            'django.template.context_processors.debug',
            'django.template.context_processors.request',
            'django.contrib.auth.context_processors.auth',
            'django.contrib.messages.context_processors.messages',
            'django.core.context_processors.request',
        ],
        'loaders': (
            'admin_tools.template_loaders.Loader',
            #'django.template.loaders.filesystem.load_template_source',
            #'django.template.loaders.app_directories.load_template_source',
            'django.template.loaders.app_directories.Loader',
            #'django.template.loaders.filesystem.Loader',
        ),
    },
 },
]

#To use custom admin dashboard, edit dashboard.py file to make any changes
ADMIN_TOOLS_INDEX_DASHBOARD = 'dashboard.CustomIndexDashboard'
ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'dashboard.CustomAppIndexDashboard'

enter image description here

What could be the reason?

Thinker
  • 5,326
  • 13
  • 61
  • 137

1 Answers1

0

Have you added django-admin-tools to your urls.py file like below -

urlpatterns = patterns('', url(r'^admin_tools/', include('admin_tools.urls')), #...other url patterns... )

And make sure to migrate it using -

python manage.py migrate

Amar
  • 321
  • 3
  • 14
  • Yes this is already present, additionally I have a custom dashboard which is shown in the screenshot attached. Does it depend on what you enter in Dashboard stats criteria and dashboard stats? Only when you enter something you will see a graph? – Thinker May 31 '16 at 15:02