2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

Remove admin shell (#8816)

This commit is contained in:
Matthias Mair
2025-01-05 02:57:20 +01:00
committed by GitHub
parent ea9e3fb992
commit 7125261bbc
5 changed files with 0 additions and 37 deletions

View File

@ -353,29 +353,6 @@ QUERYCOUNT = {
'RESPONSE_HEADER': 'X-Django-Query-Count',
}
ADMIN_SHELL_ENABLE = False
ADMIN_SHELL_IMPORT_DJANGO = False
ADMIN_SHELL_IMPORT_MODELS = False
# In DEBUG mode, add support for django-admin-shell
# Ref: https://github.com/djk2/django-admin-shell
if (
DEBUG
and INVENTREE_ADMIN_ENABLED
and not TESTING
and get_boolean_setting('INVENTREE_DEBUG_SHELL', 'debug_shell', False)
):
try:
import django_admin_shell # noqa: F401
INSTALLED_APPS.append('django_admin_shell')
ADMIN_SHELL_ENABLE = True
logger.warning('Admin shell is enabled')
except ModuleNotFoundError:
logger.warning(
'django-admin-shell is not installed - Admin shell is not enabled'
)
AUTHENTICATION_BACKENDS = CONFIG.get(
'authentication_backends',

View File

@ -188,9 +188,6 @@ urlpatterns = []
if settings.INVENTREE_ADMIN_ENABLED:
admin_url = settings.INVENTREE_ADMIN_URL
if settings.ADMIN_SHELL_ENABLE:
urlpatterns += [path(f'{admin_url}/shell/', include('django_admin_shell.urls'))]
urlpatterns += [
path(f'{admin_url}/error_log/', include('error_report.urls')),
path(f'{admin_url}/', admin.site.urls, name='inventree-admin'),

View File

@ -1,7 +1,6 @@
# Dev requirements for InvenTree
-c requirements.txt
coverage[toml] # Unit test coverage
django-admin-shell # Remote shell access
django-querycount # Display number of URL queries for requests
django-slowtests # Show which unit tests are running slowly
django-test-migrations # Unit testing for database migrations

View File

@ -302,12 +302,7 @@ django==4.2.17 \
--hash=sha256:6b56d834cc94c8b21a8f4e775064896be3b4a4ca387f2612d4406a5927cd2fdc
# via
# -c src/backend/requirements.txt
# django-admin-shell
# django-slowtests
django-admin-shell==2.0.1 \
--hash=sha256:334a651e53ae4f59d0d279d7ede7dc5ed7a7733d4d093765b447dca5274c7b30 \
--hash=sha256:b129e282ebd581c2099c0504edf081259728b3a504b40c5784d0457b8cb41470
# via -r src/backend/requirements-dev.in
django-querycount==0.8.3 \
--hash=sha256:0782484e8a1bd29498fa0195a67106e47cdcc98fafe80cebb1991964077cb694
# via -r src/backend/requirements-dev.in