From e9be3e9e06c891eeadac05e80cebe51ba8d7e84b Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 3 May 2018 23:47:43 +1000 Subject: [PATCH] Install django-cleanup - Automatically removes orphaned ImageFIeld and FileField files --- InvenTree/InvenTree/settings.py | 12 +++++++----- requirements/base.txt | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index deb47901bf..14a4496f12 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -39,11 +39,6 @@ if DEBUG: # Application definition INSTALLED_APPS = [ - 'django_filters', - 'rest_framework', - 'simple_history', - 'crispy_forms', - 'import_export', # Core django modules 'django.contrib.admin', @@ -58,6 +53,13 @@ INSTALLED_APPS = [ 'stock.apps.StockConfig', 'company.apps.CompanyConfig', 'build.apps.BuildConfig', + + 'django_filters', + 'rest_framework', + 'simple_history', + 'crispy_forms', + 'import_export', + 'django_cleanup', ] MIDDLEWARE = [ diff --git a/requirements/base.txt b/requirements/base.txt index 9c9b4ed8b5..e1cdb825c4 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,4 +6,5 @@ django-simple-history>=1.8.2 coreapi>=2.3.0 pygments>=2.2.0 django-crispy-forms>=1.7.2 -django-import-export>=1.0.0 \ No newline at end of file +django-import-export>=1.0.0 +django-cleanup>=2.1.0 \ No newline at end of file