Browse Source

[core] Disable django admin app

It is unused anyway.

Avoids:

And

TypeError: __init__() got an unexpected keyword argument 'loaders'
Seems gone (but it might break)

ERRORS:
?: (admin.E402) 'django.contrib.auth.context_processors.auth' must be enabled in DjangoTemplates (TEMPLATES) if using the default auth backend in order to use the admin application.
?: (admin.E404) 'django.contrib.messages.context_processors.messages' must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin application.
?: (admin.E406) 'django.contrib.messages' must be in INSTALLED_APPS in order to use the admin application.

https://github.com/cloudera/hue/pull/1711#issuecomment-777196647
Romain Rigaux 4 years ago
parent
commit
b4705f9f80
2 changed files with 0 additions and 7 deletions
  1. 0 1
      desktop/core/src/desktop/settings.py
  2. 0 6
      desktop/core/src/desktop/urls.py

+ 0 - 1
desktop/core/src/desktop/settings.py

@@ -195,7 +195,6 @@ INSTALLED_APPS = [
     'django.contrib.sites',
     'django.contrib.staticfiles',
 
-    'django.contrib.admin',
     'django_extensions',
 
     # 'debug_toolbar',

+ 0 - 6
desktop/core/src/desktop/urls.py

@@ -34,7 +34,6 @@ desktop.lib.metrics.file_reporter.start_file_reporter()
 
 from django.conf import settings
 from django.conf.urls import include, url
-from django.contrib import admin
 from django.views.static import serve
 
 from notebook import views as notebook_views
@@ -58,7 +57,6 @@ handler403 = 'desktop.views.serve_403_error'
 handler404 = 'desktop.views.serve_404_error'
 handler500 = 'desktop.views.serve_500_error'
 
-admin.autodiscover()
 
 # Some django-wide URLs
 dynamic_patterns = [
@@ -221,10 +219,6 @@ dynamic_patterns += [
   url(r'^scheduler/', include('desktop.lib.scheduler.urls'))
 ]
 
-dynamic_patterns += [
-  url(r'^admin/?', admin.site.urls),
-]
-
 if ENABLE_PROMETHEUS.get():
   dynamic_patterns += [
     url('', include('django_prometheus.urls')),