diff --git a/templates/openwisp2/settings.py b/templates/openwisp2/settings.py index 7b4a2781..46bf2f91 100644 --- a/templates/openwisp2/settings.py +++ b/templates/openwisp2/settings.py @@ -25,6 +25,7 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'django_netjsonconfig', + 'django_netjsonconfig.admin_theme', 'django.contrib.admin', 'sortedm2m', 'reversion', diff --git a/templates/openwisp2/urls.py b/templates/openwisp2/urls.py index 9503c93a..aa3a020b 100644 --- a/templates/openwisp2/urls.py +++ b/templates/openwisp2/urls.py @@ -1,10 +1,8 @@ from django.conf.urls import include, url -from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django_netjsonconfig.admin_theme.admin import admin, openwisp_admin -admin.autodiscover() -admin.site.site_url = None - +openwisp_admin() urlpatterns = [ url(r'^admin/', include(admin.site.urls)),