mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Remove support for django-debug-toolbar (#6196)
* Remove support for django-debug-toolbar - Will not be effective with new react interface - Performance is too slow for use anyway * Fix requirements-dev.txt
This commit is contained in:
parent
5135d6b5d1
commit
d1cc81fc9f
@ -372,19 +372,6 @@ if LDAP_AUTH:
|
|||||||
AUTH_LDAP_USER_FLAGS_BY_GROUP = get_setting("INVENTREE_LDAP_USER_FLAGS_BY_GROUP", "ldap.user_flags_by_group", {}, dict)
|
AUTH_LDAP_USER_FLAGS_BY_GROUP = get_setting("INVENTREE_LDAP_USER_FLAGS_BY_GROUP", "ldap.user_flags_by_group", {}, dict)
|
||||||
AUTH_LDAP_FIND_GROUP_PERMS = True
|
AUTH_LDAP_FIND_GROUP_PERMS = True
|
||||||
|
|
||||||
DEBUG_TOOLBAR_ENABLED = DEBUG and get_setting('INVENTREE_DEBUG_TOOLBAR', 'debug_toolbar', False)
|
|
||||||
|
|
||||||
# If the debug toolbar is enabled, add the modules
|
|
||||||
if DEBUG_TOOLBAR_ENABLED: # pragma: no cover
|
|
||||||
logger.info("Running with DEBUG_TOOLBAR enabled")
|
|
||||||
INSTALLED_APPS.append('debug_toolbar')
|
|
||||||
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
|
|
||||||
|
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
|
||||||
'RESULTS_CACHE_SIZE': 100,
|
|
||||||
'OBSERVE_REQUEST_CALLBACK': lambda x: False,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Internal IP addresses allowed to see the debug toolbar
|
# Internal IP addresses allowed to see the debug toolbar
|
||||||
INTERNAL_IPS = [
|
INTERNAL_IPS = [
|
||||||
'127.0.0.1',
|
'127.0.0.1',
|
||||||
@ -437,12 +424,6 @@ TEMPLATES = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
if DEBUG_TOOLBAR_ENABLED: # pragma: no cover
|
|
||||||
# Note that the APP_DIRS value must be set when using debug_toolbar
|
|
||||||
# But this will kill template loading for plugins
|
|
||||||
TEMPLATES[0]['APP_DIRS'] = True
|
|
||||||
del TEMPLATES[0]['OPTIONS']['loaders']
|
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'EXCEPTION_HANDLER': 'InvenTree.exceptions.exception_handler',
|
'EXCEPTION_HANDLER': 'InvenTree.exceptions.exception_handler',
|
||||||
'DATETIME_FORMAT': '%Y-%m-%d %H:%M',
|
'DATETIME_FORMAT': '%Y-%m-%d %H:%M',
|
||||||
|
@ -249,13 +249,6 @@ if settings.DEBUG:
|
|||||||
# Media file access
|
# Media file access
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
||||||
# Debug toolbar access (only allowed in DEBUG mode)
|
|
||||||
if settings.DEBUG_TOOLBAR_ENABLED:
|
|
||||||
import debug_toolbar
|
|
||||||
urlpatterns = [
|
|
||||||
path('__debug__/', include(debug_toolbar.urls)),
|
|
||||||
] + urlpatterns
|
|
||||||
|
|
||||||
# Redirect for favicon.ico
|
# Redirect for favicon.ico
|
||||||
urlpatterns.append(
|
urlpatterns.append(
|
||||||
path('favicon.ico', RedirectView.as_view(url=f'{settings.STATIC_URL}img/favicon/favicon.ico'))
|
path('favicon.ico', RedirectView.as_view(url=f'{settings.STATIC_URL}img/favicon/favicon.ico'))
|
||||||
|
@ -28,8 +28,6 @@ InvenTree relies on the following Python libraries:
|
|||||||
| [rapidfuzz](https://pypi.org/project/rapidfuzz/) | MIT | Fuzzy string matching |
|
| [rapidfuzz](https://pypi.org/project/rapidfuzz/) | MIT | Fuzzy string matching |
|
||||||
| [django-stdimage](https://pypi.org/project/django-stdimage/) | MIT | Advanced image fields for django |
|
| [django-stdimage](https://pypi.org/project/django-stdimage/) | MIT | Advanced image fields for django |
|
||||||
| [django-weasyprint](https://pypi.org/project/django-weasyprint/) | Apache 2.0 | PDF generation |
|
| [django-weasyprint](https://pypi.org/project/django-weasyprint/) | Apache 2.0 | PDF generation |
|
||||||
| [django-debug-toolbar](https://pypi.org/project/django-debug-toolbar/) | BSD | Debug interface |
|
|
||||||
| [django-admin-shell](https://pypi.org/project/django-admin-shell/) | MIT | Command line shell for the admin interface |
|
|
||||||
| [django-money](https://pypi.org/project/django-money/) | BSD | Currency support |
|
| [django-money](https://pypi.org/project/django-money/) | BSD | Currency support |
|
||||||
| [certifi](https://pypi.org/project/certifi/) | MPL 2.0 | Web certification |
|
| [certifi](https://pypi.org/project/certifi/) | MPL 2.0 | Web certification |
|
||||||
| [django-error-report](https://pypi.org/project/django-error-report/) | BSD | Error / excepttion management |
|
| [django-error-report](https://pypi.org/project/django-error-report/) | BSD | Error / excepttion management |
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
-c requirements.txt
|
-c requirements.txt
|
||||||
coverage[toml] # Unit test coverage
|
coverage[toml] # Unit test coverage
|
||||||
coveralls==2.1.2 # Coveralls linking (for tracking coverage) # PINNED 2022-06-28 - Old version needed for correct upload
|
coveralls==2.1.2 # Coveralls linking (for tracking coverage) # PINNED 2022-06-28 - Old version needed for correct upload
|
||||||
django-debug-toolbar # Debug / profiling toolbar
|
|
||||||
django-slowtests # Show which unit tests are running slowly
|
django-slowtests # Show which unit tests are running slowly
|
||||||
django-test-migrations # Unit testing for database migrations
|
django-test-migrations # Unit testing for database migrations
|
||||||
isort # python import sorting
|
isort # python import sorting
|
||||||
|
@ -42,10 +42,7 @@ distlib==0.3.7
|
|||||||
django==3.2.23
|
django==3.2.23
|
||||||
# via
|
# via
|
||||||
# -c requirements.txt
|
# -c requirements.txt
|
||||||
# django-debug-toolbar
|
|
||||||
# django-slowtests
|
# django-slowtests
|
||||||
django-debug-toolbar==4.2.0
|
|
||||||
# via -r requirements-dev.in
|
|
||||||
django-slowtests==1.1.1
|
django-slowtests==1.1.1
|
||||||
# via -r requirements-dev.in
|
# via -r requirements-dev.in
|
||||||
django-test-migrations==1.3.0
|
django-test-migrations==1.3.0
|
||||||
@ -102,7 +99,6 @@ sqlparse==0.4.4
|
|||||||
# via
|
# via
|
||||||
# -c requirements.txt
|
# -c requirements.txt
|
||||||
# django
|
# django
|
||||||
# django-debug-toolbar
|
|
||||||
toml==0.10.2
|
toml==0.10.2
|
||||||
# via coverage
|
# via coverage
|
||||||
tomli==2.0.1
|
tomli==2.0.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user