From f36757c87bf78c7889eea3b5004f75f82501d2d4 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 10 Jul 2019 23:11:13 +1000 Subject: [PATCH 01/13] Load database settings from config.yaml file - Provide an initial config file --- .gitignore | 1 + InvenTree/InvenTree/settings.py | 65 ++++++++++++++------------------- InvenTree/config.yaml | 20 ++++++++++ 3 files changed, 48 insertions(+), 38 deletions(-) create mode 100644 InvenTree/config.yaml diff --git a/.gitignore b/.gitignore index 25ae56db0a..f251804992 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ secret_key.txt # IDE / development files .idea/ *.code-workspace +.vscode/ # Coverage reports .coverage diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 83549d70e2..7ed35a11e2 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -1,33 +1,42 @@ """ Django settings for InvenTree project. -Generated by 'django-admin startproject' using Django 1.10.6. +In practice the settings in this file should not be adjusted, +instead settings can be configured in the config.yaml file +located in the top level project directory. -For more information on this file, see -https://docs.djangoproject.com/en/1.10/topics/settings/ +This allows implementation configuration to be hidden from source control, +as well as separate configuration parameters from the more complex +database setup in this file. -For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os import logging import tempfile +import io +import yaml # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +cfg_filename = os.path.join(BASE_DIR, 'config.yaml') -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ +if not os.path.exists(cfg_filename): + CONFIG = {} + print("Warning: config.yaml not found - using default settings") +else: + with open(cfg_filename, 'r') as cfg: + CONFIG = yaml.safe_load(cfg) -# SECURITY WARNING: keep the secret key used in production secret! +# Read the autogenerated key-file key_file = open(os.path.join(BASE_DIR, 'secret_key.txt'), 'r') SECRET_KEY = key_file.read().strip() +# Default action is to run the system in Debug mode # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = CONFIG.get('debug', True) ALLOWED_HOSTS = ['*'] @@ -85,14 +94,6 @@ LOGGING = { 'class': 'logging.StreamHandler', }, }, - - # 'loggers': { - # 'ddjango.db.backends': { - # 'level': 'DEBUG', - # 'handlers': ['console',], - # 'propagate': True - # }, - # }, } @@ -108,7 +109,7 @@ MIDDLEWARE = [ 'InvenTree.middleware.AuthRequiredMiddleware', ] -if DEBUG: +if CONFIG.get('log_queries', False): MIDDLEWARE.append('InvenTree.middleware.QueryCountMiddleware') ROOT_URLCONF = 'InvenTree.urls' @@ -137,32 +138,21 @@ REST_FRAMEWORK = { 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.TokenAuthentication', ) - # 'EXCEPTION_HANDLER': 'InvenTree.utils.api_exception_handler', - # 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', - # 'PAGE_SIZE': 50, } WSGI_APPLICATION = 'InvenTree.wsgi.application' +DATABASES = {} -# Database -# https://docs.djangoproject.com/en/1.10/ref/settings/#databases - -DATABASES = { - 'default': { +# Database backend selection +if 'database' in CONFIG: + DATABASES['default'] = CONFIG['database'] +else: + print("Warning: Database backend not specified - using default") + DATABASES['default'] = { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'inventree_db.sqlite3'), - }, - # TODO - Uncomment this when postgresql support is re-integrated - # 'postgresql': { - # 'ENGINE': 'django.db.backends.postgresql', - # 'NAME': 'inventree', - # 'USER': 'inventreeuser', - # 'PASSWORD': 'inventree', - # 'HOST': 'localhost', - # 'PORT': '', - # } -} + } CACHES = { 'default': { @@ -177,7 +167,6 @@ CACHES = { QR_CODE_CACHE_ALIAS = 'qr-code' - # Password validation # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators diff --git a/InvenTree/config.yaml b/InvenTree/config.yaml new file mode 100644 index 0000000000..f2c34b65fb --- /dev/null +++ b/InvenTree/config.yaml @@ -0,0 +1,20 @@ + +# Database backend selection - Configure backend database settings +# Ref: https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-DATABASES +# Specify database parameters below as they appear in the Django docs +database: + ENGINE: django.db.backends.sqlite3 + NAME: inventree_db.sqlite3 + + # For more complex database installations, further parameters are required + # Refer to the django documentation for full list of options + # USER: db_username + # PASSWORD: db_password + # HOST: db_hostname + # PORT: db_port + +# Set debug to False to run in production mode +debug: True + +# Logging options +log_queries: False \ No newline at end of file From b941a4115ffa3920d6a0b06f247a4b957bff6e0b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 10 Jul 2019 23:11:41 +1000 Subject: [PATCH 02/13] Documentation for settings file --- docs/config.rst | 35 +++++++++++++++++++++++++++++++++++ docs/index.rst | 1 + docs/start.rst | 15 ++++++++++++--- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 docs/config.rst diff --git a/docs/config.rst b/docs/config.rst new file mode 100644 index 0000000000..68f45d4402 --- /dev/null +++ b/docs/config.rst @@ -0,0 +1,35 @@ +InvenTree Configuration +======================= + +.. toctree:: + :titlesonly: + :maxdepth: 2 + :caption: Configuration + :hidden: + +Admin users will need to adjust the InvenTree installation to meet the particular needs of their setup. For example, pointing to the correct database backend, or specifying a list of allowed hosts. + +The Django configuration parameters are found in the normal place (``settings.py``). However the settings presented in this file should not be adjusted as they will alter the core behaviour of the InvenTree application. + +To support install specific settings, a simple configuration file ``config.yaml`` is provided. This configuration file is loaded by ``settings.py`` at runtime. Settings specific to a given install should be adjusted in ``config.yaml``. + +The default configuration file launches a *DEBUG* configuration with a simple SQLITE database backend. This default configuration file is shown below: + +.. literalinclude :: ../InvenTree/config.yaml + :language: yaml + :linenos: + +Database Options +---------------- + +InvenTree provides support for multiple database backends - any backend supported natively by Django can be used. + +Database options are specified under the *database* heading in the configuration file. Any option available in the Django documentation can be used here - it is passed through transparently to the management scripts. + +**SQLITE:** +By default, InvenTree uses an sqlite database file : ``inventree_db.sqlite3``. This provides a simple, portable database file that is easy to use for debug and testing purposes. + + +**MYSQL:** MySQL database backend is supported with the native Django implemetation. + +**POSTGRESQL:** PostgreSQL database backend is supported with the native Django implementation. Note that to use this backend, the ``psycopg2`` Python library must first be installed. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 34ebc992b0..e7a4f52bad 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,6 +8,7 @@ InvenTree Source Documentation :hidden: Getting Started + Configuration Modal Forms Tables REST API diff --git a/docs/start.rst b/docs/start.rst index eab27e407f..829d051736 100644 --- a/docs/start.rst +++ b/docs/start.rst @@ -7,16 +7,16 @@ Getting Started Guide :caption: Getting Started :hidden: -To install a complete development environment for InvenTree, follow the steps presented below. +To install a complete *development* environment for InvenTree, follow the steps presented below. A production environment will require further work as per the particular application requirements. A makefile in the root directory provides shortcuts for the installation process, and can also be very useful during development. Installation ------------ -All packages required to develop and test InvenTree can be installed via pip package manager. Package requirements can be found in ``requirements.txt``. +InvenTree is a Python/Django application and relies on the pip package manager. All packages required to develop and test InvenTree can be installed via pip. Package requirements can be found in ``requirements.txt``. -To setup the InvenTree environment, run the command +To setup the InvenTree environment, run the command: ``make install`` @@ -25,6 +25,15 @@ which performs the following actions: * Installs all required Python packages using pip package manager * Generates a SECREY_KEY file required for the django authentication framework +Install Configuration +--------------------- + +InvenTree provides a simple default setup which should work *out of the box* for testing and debug purposes. For installation in production environments, further configuration options are available in the ``config.yaml`` configuration file. + +The configuration file provides administrators control over various setup options without digging into the Django ``settings.py`` script. The default setup uses a sqlite database with *DEBUG* mode enabled. + +For further information on installation configuration, refer to the `Configuration `_ section. + Superuser Account ----------------- From 820d8da2ef19ac5fe4363a14f1c1a7aa8b36016a Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 10 Jul 2019 23:25:15 +1000 Subject: [PATCH 03/13] Allowed hosts and CORS hosts now moved to the config file --- InvenTree/InvenTree/settings.py | 22 ++++++++++++++++------ InvenTree/config.yaml | 17 +++++++++++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 7ed35a11e2..ab1095560a 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -38,14 +38,24 @@ SECRET_KEY = key_file.read().strip() # SECURITY WARNING: don't run with debug turned on in production! DEBUG = CONFIG.get('debug', True) -ALLOWED_HOSTS = ['*'] +# List of allowed hosts (default = allow all) +ALLOWED_HOSTS = CONFIG.get('allowed_hosts', ['*']) -CORS_ORIGIN_WHITELIST = [ -] +# Cross Origin Resource Sharing (CORS) options -if DEBUG: - print("Warning: DEBUG mode is enabled, CORS requests are allowed for any domain") - CORS_ORIGIN_ALLOW_ALL = True +# Only allow CORS access to API +CORS_URLS_REGEX = r'^/api/.*$' + +# Extract CORS options from configuration file +cors_opt = CONFIG.get('cors', None) + +if cors_opt: + CORS_ORIGIN_ALLOW_ALL = cors_opt.get('allow_all', False) + + if CORS_ORIGIN_ALLOW_ALL: + print("Warning: DEBUG mode is enabled, CORS requests are allowed for any domain") + else: + CORS_ORIGIN_WHITELIST = cors_opt.get('whitelist', []) if DEBUG: # will output to your console diff --git a/InvenTree/config.yaml b/InvenTree/config.yaml index f2c34b65fb..7f28aa4e5c 100644 --- a/InvenTree/config.yaml +++ b/InvenTree/config.yaml @@ -16,5 +16,22 @@ database: # Set debug to False to run in production mode debug: True +# Allowed hosts (see ALLOWED_HOSTS in Django settings documentation) +# A list of strings representing the host/domain names that this Django site can serve. +# Default behaviour is to allow all hosts (THIS IS NOT SECURE!) +allowed_hosts: + - '*' + +# Cross Origin Resource Sharing (CORS) settings (see https://github.com/ottoyiu/django-cors-headers) +# Following parameters are +cors: + # CORS_ORIGIN_ALLOW_ALL - If True, the whitelist will not be used and all origins will be accepted. Defaults to False. + allow_all: False + + # CORS_ORIGIN_WHITELIST - A list of origins that are authorized to make cross-site HTTP requests. Defaults to [] + # whitelist: + # - https://example.com + # - https://sub.example.com + # Logging options log_queries: False \ No newline at end of file From e231de6951ce575fdc98fd3fecbadb6b5f67cac0 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 10 Jul 2019 23:33:46 +1000 Subject: [PATCH 04/13] Documentation for allowed hosts / CORS headers --- docs/config.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/config.rst b/docs/config.rst index 68f45d4402..737798502e 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -32,4 +32,14 @@ By default, InvenTree uses an sqlite database file : ``inventree_db.sqlite3``. T **MYSQL:** MySQL database backend is supported with the native Django implemetation. -**POSTGRESQL:** PostgreSQL database backend is supported with the native Django implementation. Note that to use this backend, the ``psycopg2`` Python library must first be installed. \ No newline at end of file +**POSTGRESQL:** PostgreSQL database backend is supported with the native Django implementation. Note that to use this backend, the ``psycopg2`` Python library must first be installed. + +Allowed Hosts / CORS +-------------------- + +By default, all hosts are allowed, and CORS requests are enabled from any origin. **This is not secure and should be adjusted for your installation**. These options can be changed in the configuration file. + +For further information, refer to the following documentation: + +* `Django ALLOWED_HOSTS `_ +* `Django CORS headers `_ From 194c15492f94a6fe661c6530723413fb4f9e536b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 10 Jul 2019 23:41:33 +1000 Subject: [PATCH 05/13] MEDIA_ROOT is now provided in config.yaml --- InvenTree/InvenTree/settings.py | 2 +- InvenTree/config.yaml | 5 +++++ docs/config.rst | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index ab1095560a..85043efd4d 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -221,7 +221,7 @@ STATICFILES_DIRS = [ MEDIA_URL = '/media/' -MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +MEDIA_ROOT = CONFIG.get('media_root', os.path.join(BASE_DIR, 'media')) # crispy forms use the bootstrap templates CRISPY_TEMPLATE_PACK = 'bootstrap' diff --git a/InvenTree/config.yaml b/InvenTree/config.yaml index 7f28aa4e5c..9e204ed563 100644 --- a/InvenTree/config.yaml +++ b/InvenTree/config.yaml @@ -33,5 +33,10 @@ cors: # - https://example.com # - https://sub.example.com +# MEDIA_ROOT is the local filesystem location for storing uploaded files +# By default, it is stored in a directory named 'media' local to the InvenTree directory +# This should be changed for a production installation +media_root: './media' + # Logging options log_queries: False \ No newline at end of file diff --git a/docs/config.rst b/docs/config.rst index 737798502e..d8388ae155 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -43,3 +43,8 @@ For further information, refer to the following documentation: * `Django ALLOWED_HOSTS `_ * `Django CORS headers `_ + +Uploaded File Storage +--------------------- + +By default, uploaded files are stored in the local direction ``./media``. This directory should be changed based on the particular installation requirements. \ No newline at end of file From ee223e5649a7ff810790a83101fe061fbb35f00e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 10 Jul 2019 23:48:33 +1000 Subject: [PATCH 06/13] Location of static files is also configurable --- InvenTree/InvenTree/settings.py | 7 +++---- InvenTree/config.yaml | 8 ++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 85043efd4d..5f7b868dc3 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -53,7 +53,7 @@ if cors_opt: CORS_ORIGIN_ALLOW_ALL = cors_opt.get('allow_all', False) if CORS_ORIGIN_ALLOW_ALL: - print("Warning: DEBUG mode is enabled, CORS requests are allowed for any domain") + print("Warning: CORS requests are allowed for any domain!") else: CORS_ORIGIN_WHITELIST = cors_opt.get('whitelist', []) @@ -106,7 +106,6 @@ LOGGING = { }, } - MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', @@ -158,7 +157,7 @@ DATABASES = {} if 'database' in CONFIG: DATABASES['default'] = CONFIG['database'] else: - print("Warning: Database backend not specified - using default") + print("Warning: Database backend not specified - using default (sqlite)") DATABASES['default'] = { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'inventree_db.sqlite3'), @@ -216,7 +215,7 @@ USE_TZ = True STATIC_URL = '/static/' STATICFILES_DIRS = [ - os.path.join(BASE_DIR, 'static'), + CONFIG.get('static_root', os.path.join(BASE_DIR, 'static')), ] MEDIA_URL = '/media/' diff --git a/InvenTree/config.yaml b/InvenTree/config.yaml index 9e204ed563..5aa24a3e69 100644 --- a/InvenTree/config.yaml +++ b/InvenTree/config.yaml @@ -25,8 +25,8 @@ allowed_hosts: # Cross Origin Resource Sharing (CORS) settings (see https://github.com/ottoyiu/django-cors-headers) # Following parameters are cors: - # CORS_ORIGIN_ALLOW_ALL - If True, the whitelist will not be used and all origins will be accepted. Defaults to False. - allow_all: False + # CORS_ORIGIN_ALLOW_ALL - If True, the whitelist will not be used and all origins will be accepted. + allow_all: True # CORS_ORIGIN_WHITELIST - A list of origins that are authorized to make cross-site HTTP requests. Defaults to [] # whitelist: @@ -38,5 +38,9 @@ cors: # This should be changed for a production installation media_root: './media' +# STATIC_ROOT is the local filesystem location for storing static files +# By default it is stored in a directory named 'static' local to the InvenTree directory +static_root: './static' + # Logging options log_queries: False \ No newline at end of file From 377b2f94cec893acad95cdfdad189ca79eb044ed Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 10 Jul 2019 23:54:33 +1000 Subject: [PATCH 07/13] Remove unused io module --- InvenTree/InvenTree/settings.py | 1 - 1 file changed, 1 deletion(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 5f7b868dc3..cb154229d8 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -14,7 +14,6 @@ database setup in this file. import os import logging import tempfile -import io import yaml # Build paths inside the project like this: os.path.join(BASE_DIR, ...) From 23d19d67849a13cee1318036e3c2ea69df3c7a6a Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 11 Jul 2019 12:56:10 +1000 Subject: [PATCH 08/13] Remove old debug messages --- InvenTree/company/views.py | 2 -- InvenTree/part/bom.py | 3 +-- InvenTree/stock/models.py | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/InvenTree/company/views.py b/InvenTree/company/views.py index c3cda22e39..e69f7691cf 100644 --- a/InvenTree/company/views.py +++ b/InvenTree/company/views.py @@ -235,8 +235,6 @@ class PriceBreakCreate(AjaxCreateView): initials = super(AjaxCreateView, self).get_initial() - print("GETTING INITIAL DAtA") - initials['part'] = self.get_part() return initials diff --git a/InvenTree/part/bom.py b/InvenTree/part/bom.py index a96c331a4b..1a37aa92d0 100644 --- a/InvenTree/part/bom.py +++ b/InvenTree/part/bom.py @@ -176,13 +176,12 @@ class BomUploadManager: try: # Excel import casts number-looking-items into floats, which is annoying if item == int(item) and not str(item) == str(int(item)): - print("converting", item, "to", int(item)) data[idx] = int(item) except ValueError: pass + # Skip empty rows if empty: - print("Empty - continuing") continue row = { diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index e992b4eb9f..34dcd00464 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -147,8 +147,6 @@ class StockItem(models.Model): - Quantity must be 1 if the StockItem has a serial number """ - print("Trying to clean the StockItem") - # The 'supplier_part' field must point to the same part! try: if self.supplier_part is not None: From 07c95f20321da6269cac63808f30c088ff107834 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 11 Jul 2019 23:15:24 +1000 Subject: [PATCH 09/13] Doc tweaks --- docs/forms.rst | 2 +- docs/reference.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/forms.rst b/docs/forms.rst index a9c56cf64b..9bdb0dc7a6 100644 --- a/docs/forms.rst +++ b/docs/forms.rst @@ -3,7 +3,7 @@ InvenTree Modal Forms .. toctree:: :titlesonly: - :maxdepth: 1 + :maxdepth: 2 :caption: Modal Forms :hidden: diff --git a/docs/reference.rst b/docs/reference.rst index bbf9958fcb..5a45ca9177 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -3,7 +3,7 @@ Module Reference .. toctree:: :titlesonly: - :maxdepth: 1 + :maxdepth: 2 :caption: Module Reference :hidden: From df6db38535f9c339be8608153b73c132e19fd0b9 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 11 Jul 2019 23:47:46 +1000 Subject: [PATCH 10/13] Move static files into the app directory - As it is written - Look where properly reading the docs gets you! - manage.py collectstatic now actually works... --- InvenTree/InvenTree/settings.py | 4 +++- .../static/css/bootstrap-table-group-by.css | 0 .../{ => InvenTree}/static/css/bootstrap-table.css | 0 .../{ => InvenTree}/static/css/bootstrap-toggle.css | 0 .../static/css/bootstrap-treeview.css | 0 .../css/bootstrap_3.3.7_css_bootstrap.min.css | 0 InvenTree/{ => InvenTree}/static/css/inventree.css | 0 .../static/css/select2-bootstrap.css | 0 InvenTree/{ => InvenTree}/static/css/select2.css | 0 .../static/fonts/glyphicons-halflings-regular.eot | Bin .../static/fonts/glyphicons-halflings-regular.svg | 0 .../static/fonts/glyphicons-halflings-regular.ttf | Bin .../static/fonts/glyphicons-halflings-regular.woff | Bin .../static/fonts/glyphicons-halflings-regular.woff2 | Bin .../{ => InvenTree}/static/img/blank_image.png | Bin .../static/img/favicon/android-icon-144x144.png | Bin .../static/img/favicon/android-icon-192x192.png | Bin .../static/img/favicon/android-icon-36x36.png | Bin .../static/img/favicon/android-icon-48x48.png | Bin .../static/img/favicon/android-icon-72x72.png | Bin .../static/img/favicon/android-icon-96x96.png | Bin .../static/img/favicon/apple-icon-114x114.png | Bin .../static/img/favicon/apple-icon-120x120.png | Bin .../static/img/favicon/apple-icon-144x144.png | Bin .../static/img/favicon/apple-icon-152x152.png | Bin .../static/img/favicon/apple-icon-180x180.png | Bin .../static/img/favicon/apple-icon-57x57.png | Bin .../static/img/favicon/apple-icon-60x60.png | Bin .../static/img/favicon/apple-icon-72x72.png | Bin .../static/img/favicon/apple-icon-76x76.png | Bin .../static/img/favicon/apple-icon-precomposed.png | Bin .../static/img/favicon/apple-icon.png | Bin .../static/img/favicon/browserconfig.xml | 0 .../static/img/favicon/favicon-16x16.png | Bin .../static/img/favicon/favicon-32x32.png | Bin .../static/img/favicon/favicon-96x96.png | Bin .../{ => InvenTree}/static/img/favicon/favicon.ico | Bin .../static/img/favicon/manifest.json | 0 .../static/img/favicon/ms-icon-144x144.png | Bin .../static/img/favicon/ms-icon-150x150.png | Bin .../static/img/favicon/ms-icon-310x310.png | Bin .../static/img/favicon/ms-icon-70x70.png | Bin InvenTree/{ => InvenTree}/static/img/inventree.png | Bin .../script/bootstrap/bootstrap-table-en-US.min.js | 0 .../script/bootstrap/bootstrap-table-group-by.js | 0 .../static/script/bootstrap/bootstrap-table.js | 0 .../static/script/bootstrap/bootstrap-toggle.js | 0 .../static/script/bootstrap/bootstrap-treeview.js | 0 .../static/script/bootstrap/bootstrap.min.js | 0 .../{ => InvenTree}/static/script/inventree/api.js | 0 .../{ => InvenTree}/static/script/inventree/bom.js | 0 .../static/script/inventree/build.js | 0 .../static/script/inventree/delay.js | 0 .../static/script/inventree/inventree.js | 0 .../static/script/inventree/modals.js | 0 .../static/script/inventree/notification.js | 0 .../static/script/inventree/order.js | 0 .../{ => InvenTree}/static/script/inventree/part.js | 0 .../static/script/inventree/sidenav.js | 0 .../static/script/inventree/stock.js | 0 .../static/script/inventree/tables.js | 0 .../static/script/jquery.form.min.js | 0 .../static/script/jquery_3.3.1_jquery.min.js | 0 InvenTree/{ => InvenTree}/static/script/moment.js | 0 .../static/script/select2/i18n/af.js | 0 .../static/script/select2/i18n/ar.js | 0 .../static/script/select2/i18n/az.js | 0 .../static/script/select2/i18n/bg.js | 0 .../static/script/select2/i18n/bs.js | 0 .../static/script/select2/i18n/ca.js | 0 .../static/script/select2/i18n/cs.js | 0 .../static/script/select2/i18n/da.js | 0 .../static/script/select2/i18n/de.js | 0 .../static/script/select2/i18n/dsb.js | 0 .../static/script/select2/i18n/el.js | 0 .../static/script/select2/i18n/en.js | 0 .../static/script/select2/i18n/es.js | 0 .../static/script/select2/i18n/et.js | 0 .../static/script/select2/i18n/eu.js | 0 .../static/script/select2/i18n/fa.js | 0 .../static/script/select2/i18n/fi.js | 0 .../static/script/select2/i18n/fr.js | 0 .../static/script/select2/i18n/gl.js | 0 .../static/script/select2/i18n/he.js | 0 .../static/script/select2/i18n/hi.js | 0 .../static/script/select2/i18n/hr.js | 0 .../static/script/select2/i18n/hsb.js | 0 .../static/script/select2/i18n/hu.js | 0 .../static/script/select2/i18n/hy.js | 0 .../static/script/select2/i18n/id.js | 0 .../static/script/select2/i18n/is.js | 0 .../static/script/select2/i18n/it.js | 0 .../static/script/select2/i18n/ja.js | 0 .../static/script/select2/i18n/km.js | 0 .../static/script/select2/i18n/ko.js | 0 .../static/script/select2/i18n/lt.js | 0 .../static/script/select2/i18n/lv.js | 0 .../static/script/select2/i18n/mk.js | 0 .../static/script/select2/i18n/ms.js | 0 .../static/script/select2/i18n/nb.js | 0 .../static/script/select2/i18n/nl.js | 0 .../static/script/select2/i18n/pl.js | 0 .../static/script/select2/i18n/ps.js | 0 .../static/script/select2/i18n/pt-BR.js | 0 .../static/script/select2/i18n/pt.js | 0 .../static/script/select2/i18n/ro.js | 0 .../static/script/select2/i18n/ru.js | 0 .../static/script/select2/i18n/sk.js | 0 .../static/script/select2/i18n/sl.js | 0 .../static/script/select2/i18n/sr-Cyrl.js | 0 .../static/script/select2/i18n/sr.js | 0 .../static/script/select2/i18n/sv.js | 0 .../static/script/select2/i18n/th.js | 0 .../static/script/select2/i18n/tr.js | 0 .../static/script/select2/i18n/uk.js | 0 .../static/script/select2/i18n/vi.js | 0 .../static/script/select2/i18n/zh-CN.js | 0 .../static/script/select2/i18n/zh-TW.js | 0 .../static/script/select2/select2.full.js | 0 .../static/script/select2/select2.full.min.js | 0 .../static/script/select2/select2.js | 0 .../static/script/select2/select2.min.js | 0 122 files changed, 3 insertions(+), 1 deletion(-) rename InvenTree/{ => InvenTree}/static/css/bootstrap-table-group-by.css (100%) rename InvenTree/{ => InvenTree}/static/css/bootstrap-table.css (100%) rename InvenTree/{ => InvenTree}/static/css/bootstrap-toggle.css (100%) rename InvenTree/{ => InvenTree}/static/css/bootstrap-treeview.css (100%) rename InvenTree/{ => InvenTree}/static/css/bootstrap_3.3.7_css_bootstrap.min.css (100%) rename InvenTree/{ => InvenTree}/static/css/inventree.css (100%) rename InvenTree/{ => InvenTree}/static/css/select2-bootstrap.css (100%) rename InvenTree/{ => InvenTree}/static/css/select2.css (100%) rename InvenTree/{ => InvenTree}/static/fonts/glyphicons-halflings-regular.eot (100%) rename InvenTree/{ => InvenTree}/static/fonts/glyphicons-halflings-regular.svg (100%) rename InvenTree/{ => InvenTree}/static/fonts/glyphicons-halflings-regular.ttf (100%) rename InvenTree/{ => InvenTree}/static/fonts/glyphicons-halflings-regular.woff (100%) rename InvenTree/{ => InvenTree}/static/fonts/glyphicons-halflings-regular.woff2 (100%) rename InvenTree/{ => InvenTree}/static/img/blank_image.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/android-icon-144x144.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/android-icon-192x192.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/android-icon-36x36.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/android-icon-48x48.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/android-icon-72x72.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/android-icon-96x96.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-114x114.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-120x120.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-144x144.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-152x152.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-180x180.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-57x57.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-60x60.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-72x72.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-76x76.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon-precomposed.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/apple-icon.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/browserconfig.xml (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/favicon-16x16.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/favicon-32x32.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/favicon-96x96.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/favicon.ico (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/manifest.json (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/ms-icon-144x144.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/ms-icon-150x150.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/ms-icon-310x310.png (100%) rename InvenTree/{ => InvenTree}/static/img/favicon/ms-icon-70x70.png (100%) rename InvenTree/{ => InvenTree}/static/img/inventree.png (100%) rename InvenTree/{ => InvenTree}/static/script/bootstrap/bootstrap-table-en-US.min.js (100%) rename InvenTree/{ => InvenTree}/static/script/bootstrap/bootstrap-table-group-by.js (100%) rename InvenTree/{ => InvenTree}/static/script/bootstrap/bootstrap-table.js (100%) rename InvenTree/{ => InvenTree}/static/script/bootstrap/bootstrap-toggle.js (100%) rename InvenTree/{ => InvenTree}/static/script/bootstrap/bootstrap-treeview.js (100%) rename InvenTree/{ => InvenTree}/static/script/bootstrap/bootstrap.min.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/api.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/bom.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/build.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/delay.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/inventree.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/modals.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/notification.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/order.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/part.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/sidenav.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/stock.js (100%) rename InvenTree/{ => InvenTree}/static/script/inventree/tables.js (100%) rename InvenTree/{ => InvenTree}/static/script/jquery.form.min.js (100%) rename InvenTree/{ => InvenTree}/static/script/jquery_3.3.1_jquery.min.js (100%) rename InvenTree/{ => InvenTree}/static/script/moment.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/af.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/ar.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/az.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/bg.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/bs.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/ca.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/cs.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/da.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/de.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/dsb.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/el.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/en.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/es.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/et.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/eu.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/fa.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/fi.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/fr.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/gl.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/he.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/hi.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/hr.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/hsb.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/hu.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/hy.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/id.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/is.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/it.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/ja.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/km.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/ko.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/lt.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/lv.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/mk.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/ms.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/nb.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/nl.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/pl.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/ps.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/pt-BR.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/pt.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/ro.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/ru.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/sk.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/sl.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/sr-Cyrl.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/sr.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/sv.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/th.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/tr.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/uk.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/vi.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/zh-CN.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/i18n/zh-TW.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/select2.full.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/select2.full.min.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/select2.js (100%) rename InvenTree/{ => InvenTree}/static/script/select2/select2.min.js (100%) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index cb154229d8..42d9a4b243 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -213,8 +213,10 @@ USE_TZ = True STATIC_URL = '/static/' +STATIC_ROOT = CONFIG.get('static_root', os.path.join(BASE_DIR, 'static')) + STATICFILES_DIRS = [ - CONFIG.get('static_root', os.path.join(BASE_DIR, 'static')), + os.path.join(BASE_DIR, 'InvenTree', 'static'), ] MEDIA_URL = '/media/' diff --git a/InvenTree/static/css/bootstrap-table-group-by.css b/InvenTree/InvenTree/static/css/bootstrap-table-group-by.css similarity index 100% rename from InvenTree/static/css/bootstrap-table-group-by.css rename to InvenTree/InvenTree/static/css/bootstrap-table-group-by.css diff --git a/InvenTree/static/css/bootstrap-table.css b/InvenTree/InvenTree/static/css/bootstrap-table.css similarity index 100% rename from InvenTree/static/css/bootstrap-table.css rename to InvenTree/InvenTree/static/css/bootstrap-table.css diff --git a/InvenTree/static/css/bootstrap-toggle.css b/InvenTree/InvenTree/static/css/bootstrap-toggle.css similarity index 100% rename from InvenTree/static/css/bootstrap-toggle.css rename to InvenTree/InvenTree/static/css/bootstrap-toggle.css diff --git a/InvenTree/static/css/bootstrap-treeview.css b/InvenTree/InvenTree/static/css/bootstrap-treeview.css similarity index 100% rename from InvenTree/static/css/bootstrap-treeview.css rename to InvenTree/InvenTree/static/css/bootstrap-treeview.css diff --git a/InvenTree/static/css/bootstrap_3.3.7_css_bootstrap.min.css b/InvenTree/InvenTree/static/css/bootstrap_3.3.7_css_bootstrap.min.css similarity index 100% rename from InvenTree/static/css/bootstrap_3.3.7_css_bootstrap.min.css rename to InvenTree/InvenTree/static/css/bootstrap_3.3.7_css_bootstrap.min.css diff --git a/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css similarity index 100% rename from InvenTree/static/css/inventree.css rename to InvenTree/InvenTree/static/css/inventree.css diff --git a/InvenTree/static/css/select2-bootstrap.css b/InvenTree/InvenTree/static/css/select2-bootstrap.css similarity index 100% rename from InvenTree/static/css/select2-bootstrap.css rename to InvenTree/InvenTree/static/css/select2-bootstrap.css diff --git a/InvenTree/static/css/select2.css b/InvenTree/InvenTree/static/css/select2.css similarity index 100% rename from InvenTree/static/css/select2.css rename to InvenTree/InvenTree/static/css/select2.css diff --git a/InvenTree/static/fonts/glyphicons-halflings-regular.eot b/InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from InvenTree/static/fonts/glyphicons-halflings-regular.eot rename to InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.eot diff --git a/InvenTree/static/fonts/glyphicons-halflings-regular.svg b/InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from InvenTree/static/fonts/glyphicons-halflings-regular.svg rename to InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.svg diff --git a/InvenTree/static/fonts/glyphicons-halflings-regular.ttf b/InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from InvenTree/static/fonts/glyphicons-halflings-regular.ttf rename to InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.ttf diff --git a/InvenTree/static/fonts/glyphicons-halflings-regular.woff b/InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from InvenTree/static/fonts/glyphicons-halflings-regular.woff rename to InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.woff diff --git a/InvenTree/static/fonts/glyphicons-halflings-regular.woff2 b/InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from InvenTree/static/fonts/glyphicons-halflings-regular.woff2 rename to InvenTree/InvenTree/static/fonts/glyphicons-halflings-regular.woff2 diff --git a/InvenTree/static/img/blank_image.png b/InvenTree/InvenTree/static/img/blank_image.png similarity index 100% rename from InvenTree/static/img/blank_image.png rename to InvenTree/InvenTree/static/img/blank_image.png diff --git a/InvenTree/static/img/favicon/android-icon-144x144.png b/InvenTree/InvenTree/static/img/favicon/android-icon-144x144.png similarity index 100% rename from InvenTree/static/img/favicon/android-icon-144x144.png rename to InvenTree/InvenTree/static/img/favicon/android-icon-144x144.png diff --git a/InvenTree/static/img/favicon/android-icon-192x192.png b/InvenTree/InvenTree/static/img/favicon/android-icon-192x192.png similarity index 100% rename from InvenTree/static/img/favicon/android-icon-192x192.png rename to InvenTree/InvenTree/static/img/favicon/android-icon-192x192.png diff --git a/InvenTree/static/img/favicon/android-icon-36x36.png b/InvenTree/InvenTree/static/img/favicon/android-icon-36x36.png similarity index 100% rename from InvenTree/static/img/favicon/android-icon-36x36.png rename to InvenTree/InvenTree/static/img/favicon/android-icon-36x36.png diff --git a/InvenTree/static/img/favicon/android-icon-48x48.png b/InvenTree/InvenTree/static/img/favicon/android-icon-48x48.png similarity index 100% rename from InvenTree/static/img/favicon/android-icon-48x48.png rename to InvenTree/InvenTree/static/img/favicon/android-icon-48x48.png diff --git a/InvenTree/static/img/favicon/android-icon-72x72.png b/InvenTree/InvenTree/static/img/favicon/android-icon-72x72.png similarity index 100% rename from InvenTree/static/img/favicon/android-icon-72x72.png rename to InvenTree/InvenTree/static/img/favicon/android-icon-72x72.png diff --git a/InvenTree/static/img/favicon/android-icon-96x96.png b/InvenTree/InvenTree/static/img/favicon/android-icon-96x96.png similarity index 100% rename from InvenTree/static/img/favicon/android-icon-96x96.png rename to InvenTree/InvenTree/static/img/favicon/android-icon-96x96.png diff --git a/InvenTree/static/img/favicon/apple-icon-114x114.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-114x114.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-114x114.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-114x114.png diff --git a/InvenTree/static/img/favicon/apple-icon-120x120.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-120x120.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-120x120.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-120x120.png diff --git a/InvenTree/static/img/favicon/apple-icon-144x144.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-144x144.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-144x144.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-144x144.png diff --git a/InvenTree/static/img/favicon/apple-icon-152x152.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-152x152.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-152x152.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-152x152.png diff --git a/InvenTree/static/img/favicon/apple-icon-180x180.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-180x180.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-180x180.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-180x180.png diff --git a/InvenTree/static/img/favicon/apple-icon-57x57.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-57x57.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-57x57.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-57x57.png diff --git a/InvenTree/static/img/favicon/apple-icon-60x60.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-60x60.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-60x60.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-60x60.png diff --git a/InvenTree/static/img/favicon/apple-icon-72x72.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-72x72.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-72x72.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-72x72.png diff --git a/InvenTree/static/img/favicon/apple-icon-76x76.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-76x76.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-76x76.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-76x76.png diff --git a/InvenTree/static/img/favicon/apple-icon-precomposed.png b/InvenTree/InvenTree/static/img/favicon/apple-icon-precomposed.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon-precomposed.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon-precomposed.png diff --git a/InvenTree/static/img/favicon/apple-icon.png b/InvenTree/InvenTree/static/img/favicon/apple-icon.png similarity index 100% rename from InvenTree/static/img/favicon/apple-icon.png rename to InvenTree/InvenTree/static/img/favicon/apple-icon.png diff --git a/InvenTree/static/img/favicon/browserconfig.xml b/InvenTree/InvenTree/static/img/favicon/browserconfig.xml similarity index 100% rename from InvenTree/static/img/favicon/browserconfig.xml rename to InvenTree/InvenTree/static/img/favicon/browserconfig.xml diff --git a/InvenTree/static/img/favicon/favicon-16x16.png b/InvenTree/InvenTree/static/img/favicon/favicon-16x16.png similarity index 100% rename from InvenTree/static/img/favicon/favicon-16x16.png rename to InvenTree/InvenTree/static/img/favicon/favicon-16x16.png diff --git a/InvenTree/static/img/favicon/favicon-32x32.png b/InvenTree/InvenTree/static/img/favicon/favicon-32x32.png similarity index 100% rename from InvenTree/static/img/favicon/favicon-32x32.png rename to InvenTree/InvenTree/static/img/favicon/favicon-32x32.png diff --git a/InvenTree/static/img/favicon/favicon-96x96.png b/InvenTree/InvenTree/static/img/favicon/favicon-96x96.png similarity index 100% rename from InvenTree/static/img/favicon/favicon-96x96.png rename to InvenTree/InvenTree/static/img/favicon/favicon-96x96.png diff --git a/InvenTree/static/img/favicon/favicon.ico b/InvenTree/InvenTree/static/img/favicon/favicon.ico similarity index 100% rename from InvenTree/static/img/favicon/favicon.ico rename to InvenTree/InvenTree/static/img/favicon/favicon.ico diff --git a/InvenTree/static/img/favicon/manifest.json b/InvenTree/InvenTree/static/img/favicon/manifest.json similarity index 100% rename from InvenTree/static/img/favicon/manifest.json rename to InvenTree/InvenTree/static/img/favicon/manifest.json diff --git a/InvenTree/static/img/favicon/ms-icon-144x144.png b/InvenTree/InvenTree/static/img/favicon/ms-icon-144x144.png similarity index 100% rename from InvenTree/static/img/favicon/ms-icon-144x144.png rename to InvenTree/InvenTree/static/img/favicon/ms-icon-144x144.png diff --git a/InvenTree/static/img/favicon/ms-icon-150x150.png b/InvenTree/InvenTree/static/img/favicon/ms-icon-150x150.png similarity index 100% rename from InvenTree/static/img/favicon/ms-icon-150x150.png rename to InvenTree/InvenTree/static/img/favicon/ms-icon-150x150.png diff --git a/InvenTree/static/img/favicon/ms-icon-310x310.png b/InvenTree/InvenTree/static/img/favicon/ms-icon-310x310.png similarity index 100% rename from InvenTree/static/img/favicon/ms-icon-310x310.png rename to InvenTree/InvenTree/static/img/favicon/ms-icon-310x310.png diff --git a/InvenTree/static/img/favicon/ms-icon-70x70.png b/InvenTree/InvenTree/static/img/favicon/ms-icon-70x70.png similarity index 100% rename from InvenTree/static/img/favicon/ms-icon-70x70.png rename to InvenTree/InvenTree/static/img/favicon/ms-icon-70x70.png diff --git a/InvenTree/static/img/inventree.png b/InvenTree/InvenTree/static/img/inventree.png similarity index 100% rename from InvenTree/static/img/inventree.png rename to InvenTree/InvenTree/static/img/inventree.png diff --git a/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js similarity index 100% rename from InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js rename to InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-en-US.min.js diff --git a/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js similarity index 100% rename from InvenTree/static/script/bootstrap/bootstrap-table-group-by.js rename to InvenTree/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js diff --git a/InvenTree/static/script/bootstrap/bootstrap-table.js b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-table.js similarity index 100% rename from InvenTree/static/script/bootstrap/bootstrap-table.js rename to InvenTree/InvenTree/static/script/bootstrap/bootstrap-table.js diff --git a/InvenTree/static/script/bootstrap/bootstrap-toggle.js b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-toggle.js similarity index 100% rename from InvenTree/static/script/bootstrap/bootstrap-toggle.js rename to InvenTree/InvenTree/static/script/bootstrap/bootstrap-toggle.js diff --git a/InvenTree/static/script/bootstrap/bootstrap-treeview.js b/InvenTree/InvenTree/static/script/bootstrap/bootstrap-treeview.js similarity index 100% rename from InvenTree/static/script/bootstrap/bootstrap-treeview.js rename to InvenTree/InvenTree/static/script/bootstrap/bootstrap-treeview.js diff --git a/InvenTree/static/script/bootstrap/bootstrap.min.js b/InvenTree/InvenTree/static/script/bootstrap/bootstrap.min.js similarity index 100% rename from InvenTree/static/script/bootstrap/bootstrap.min.js rename to InvenTree/InvenTree/static/script/bootstrap/bootstrap.min.js diff --git a/InvenTree/static/script/inventree/api.js b/InvenTree/InvenTree/static/script/inventree/api.js similarity index 100% rename from InvenTree/static/script/inventree/api.js rename to InvenTree/InvenTree/static/script/inventree/api.js diff --git a/InvenTree/static/script/inventree/bom.js b/InvenTree/InvenTree/static/script/inventree/bom.js similarity index 100% rename from InvenTree/static/script/inventree/bom.js rename to InvenTree/InvenTree/static/script/inventree/bom.js diff --git a/InvenTree/static/script/inventree/build.js b/InvenTree/InvenTree/static/script/inventree/build.js similarity index 100% rename from InvenTree/static/script/inventree/build.js rename to InvenTree/InvenTree/static/script/inventree/build.js diff --git a/InvenTree/static/script/inventree/delay.js b/InvenTree/InvenTree/static/script/inventree/delay.js similarity index 100% rename from InvenTree/static/script/inventree/delay.js rename to InvenTree/InvenTree/static/script/inventree/delay.js diff --git a/InvenTree/static/script/inventree/inventree.js b/InvenTree/InvenTree/static/script/inventree/inventree.js similarity index 100% rename from InvenTree/static/script/inventree/inventree.js rename to InvenTree/InvenTree/static/script/inventree/inventree.js diff --git a/InvenTree/static/script/inventree/modals.js b/InvenTree/InvenTree/static/script/inventree/modals.js similarity index 100% rename from InvenTree/static/script/inventree/modals.js rename to InvenTree/InvenTree/static/script/inventree/modals.js diff --git a/InvenTree/static/script/inventree/notification.js b/InvenTree/InvenTree/static/script/inventree/notification.js similarity index 100% rename from InvenTree/static/script/inventree/notification.js rename to InvenTree/InvenTree/static/script/inventree/notification.js diff --git a/InvenTree/static/script/inventree/order.js b/InvenTree/InvenTree/static/script/inventree/order.js similarity index 100% rename from InvenTree/static/script/inventree/order.js rename to InvenTree/InvenTree/static/script/inventree/order.js diff --git a/InvenTree/static/script/inventree/part.js b/InvenTree/InvenTree/static/script/inventree/part.js similarity index 100% rename from InvenTree/static/script/inventree/part.js rename to InvenTree/InvenTree/static/script/inventree/part.js diff --git a/InvenTree/static/script/inventree/sidenav.js b/InvenTree/InvenTree/static/script/inventree/sidenav.js similarity index 100% rename from InvenTree/static/script/inventree/sidenav.js rename to InvenTree/InvenTree/static/script/inventree/sidenav.js diff --git a/InvenTree/static/script/inventree/stock.js b/InvenTree/InvenTree/static/script/inventree/stock.js similarity index 100% rename from InvenTree/static/script/inventree/stock.js rename to InvenTree/InvenTree/static/script/inventree/stock.js diff --git a/InvenTree/static/script/inventree/tables.js b/InvenTree/InvenTree/static/script/inventree/tables.js similarity index 100% rename from InvenTree/static/script/inventree/tables.js rename to InvenTree/InvenTree/static/script/inventree/tables.js diff --git a/InvenTree/static/script/jquery.form.min.js b/InvenTree/InvenTree/static/script/jquery.form.min.js similarity index 100% rename from InvenTree/static/script/jquery.form.min.js rename to InvenTree/InvenTree/static/script/jquery.form.min.js diff --git a/InvenTree/static/script/jquery_3.3.1_jquery.min.js b/InvenTree/InvenTree/static/script/jquery_3.3.1_jquery.min.js similarity index 100% rename from InvenTree/static/script/jquery_3.3.1_jquery.min.js rename to InvenTree/InvenTree/static/script/jquery_3.3.1_jquery.min.js diff --git a/InvenTree/static/script/moment.js b/InvenTree/InvenTree/static/script/moment.js similarity index 100% rename from InvenTree/static/script/moment.js rename to InvenTree/InvenTree/static/script/moment.js diff --git a/InvenTree/static/script/select2/i18n/af.js b/InvenTree/InvenTree/static/script/select2/i18n/af.js similarity index 100% rename from InvenTree/static/script/select2/i18n/af.js rename to InvenTree/InvenTree/static/script/select2/i18n/af.js diff --git a/InvenTree/static/script/select2/i18n/ar.js b/InvenTree/InvenTree/static/script/select2/i18n/ar.js similarity index 100% rename from InvenTree/static/script/select2/i18n/ar.js rename to InvenTree/InvenTree/static/script/select2/i18n/ar.js diff --git a/InvenTree/static/script/select2/i18n/az.js b/InvenTree/InvenTree/static/script/select2/i18n/az.js similarity index 100% rename from InvenTree/static/script/select2/i18n/az.js rename to InvenTree/InvenTree/static/script/select2/i18n/az.js diff --git a/InvenTree/static/script/select2/i18n/bg.js b/InvenTree/InvenTree/static/script/select2/i18n/bg.js similarity index 100% rename from InvenTree/static/script/select2/i18n/bg.js rename to InvenTree/InvenTree/static/script/select2/i18n/bg.js diff --git a/InvenTree/static/script/select2/i18n/bs.js b/InvenTree/InvenTree/static/script/select2/i18n/bs.js similarity index 100% rename from InvenTree/static/script/select2/i18n/bs.js rename to InvenTree/InvenTree/static/script/select2/i18n/bs.js diff --git a/InvenTree/static/script/select2/i18n/ca.js b/InvenTree/InvenTree/static/script/select2/i18n/ca.js similarity index 100% rename from InvenTree/static/script/select2/i18n/ca.js rename to InvenTree/InvenTree/static/script/select2/i18n/ca.js diff --git a/InvenTree/static/script/select2/i18n/cs.js b/InvenTree/InvenTree/static/script/select2/i18n/cs.js similarity index 100% rename from InvenTree/static/script/select2/i18n/cs.js rename to InvenTree/InvenTree/static/script/select2/i18n/cs.js diff --git a/InvenTree/static/script/select2/i18n/da.js b/InvenTree/InvenTree/static/script/select2/i18n/da.js similarity index 100% rename from InvenTree/static/script/select2/i18n/da.js rename to InvenTree/InvenTree/static/script/select2/i18n/da.js diff --git a/InvenTree/static/script/select2/i18n/de.js b/InvenTree/InvenTree/static/script/select2/i18n/de.js similarity index 100% rename from InvenTree/static/script/select2/i18n/de.js rename to InvenTree/InvenTree/static/script/select2/i18n/de.js diff --git a/InvenTree/static/script/select2/i18n/dsb.js b/InvenTree/InvenTree/static/script/select2/i18n/dsb.js similarity index 100% rename from InvenTree/static/script/select2/i18n/dsb.js rename to InvenTree/InvenTree/static/script/select2/i18n/dsb.js diff --git a/InvenTree/static/script/select2/i18n/el.js b/InvenTree/InvenTree/static/script/select2/i18n/el.js similarity index 100% rename from InvenTree/static/script/select2/i18n/el.js rename to InvenTree/InvenTree/static/script/select2/i18n/el.js diff --git a/InvenTree/static/script/select2/i18n/en.js b/InvenTree/InvenTree/static/script/select2/i18n/en.js similarity index 100% rename from InvenTree/static/script/select2/i18n/en.js rename to InvenTree/InvenTree/static/script/select2/i18n/en.js diff --git a/InvenTree/static/script/select2/i18n/es.js b/InvenTree/InvenTree/static/script/select2/i18n/es.js similarity index 100% rename from InvenTree/static/script/select2/i18n/es.js rename to InvenTree/InvenTree/static/script/select2/i18n/es.js diff --git a/InvenTree/static/script/select2/i18n/et.js b/InvenTree/InvenTree/static/script/select2/i18n/et.js similarity index 100% rename from InvenTree/static/script/select2/i18n/et.js rename to InvenTree/InvenTree/static/script/select2/i18n/et.js diff --git a/InvenTree/static/script/select2/i18n/eu.js b/InvenTree/InvenTree/static/script/select2/i18n/eu.js similarity index 100% rename from InvenTree/static/script/select2/i18n/eu.js rename to InvenTree/InvenTree/static/script/select2/i18n/eu.js diff --git a/InvenTree/static/script/select2/i18n/fa.js b/InvenTree/InvenTree/static/script/select2/i18n/fa.js similarity index 100% rename from InvenTree/static/script/select2/i18n/fa.js rename to InvenTree/InvenTree/static/script/select2/i18n/fa.js diff --git a/InvenTree/static/script/select2/i18n/fi.js b/InvenTree/InvenTree/static/script/select2/i18n/fi.js similarity index 100% rename from InvenTree/static/script/select2/i18n/fi.js rename to InvenTree/InvenTree/static/script/select2/i18n/fi.js diff --git a/InvenTree/static/script/select2/i18n/fr.js b/InvenTree/InvenTree/static/script/select2/i18n/fr.js similarity index 100% rename from InvenTree/static/script/select2/i18n/fr.js rename to InvenTree/InvenTree/static/script/select2/i18n/fr.js diff --git a/InvenTree/static/script/select2/i18n/gl.js b/InvenTree/InvenTree/static/script/select2/i18n/gl.js similarity index 100% rename from InvenTree/static/script/select2/i18n/gl.js rename to InvenTree/InvenTree/static/script/select2/i18n/gl.js diff --git a/InvenTree/static/script/select2/i18n/he.js b/InvenTree/InvenTree/static/script/select2/i18n/he.js similarity index 100% rename from InvenTree/static/script/select2/i18n/he.js rename to InvenTree/InvenTree/static/script/select2/i18n/he.js diff --git a/InvenTree/static/script/select2/i18n/hi.js b/InvenTree/InvenTree/static/script/select2/i18n/hi.js similarity index 100% rename from InvenTree/static/script/select2/i18n/hi.js rename to InvenTree/InvenTree/static/script/select2/i18n/hi.js diff --git a/InvenTree/static/script/select2/i18n/hr.js b/InvenTree/InvenTree/static/script/select2/i18n/hr.js similarity index 100% rename from InvenTree/static/script/select2/i18n/hr.js rename to InvenTree/InvenTree/static/script/select2/i18n/hr.js diff --git a/InvenTree/static/script/select2/i18n/hsb.js b/InvenTree/InvenTree/static/script/select2/i18n/hsb.js similarity index 100% rename from InvenTree/static/script/select2/i18n/hsb.js rename to InvenTree/InvenTree/static/script/select2/i18n/hsb.js diff --git a/InvenTree/static/script/select2/i18n/hu.js b/InvenTree/InvenTree/static/script/select2/i18n/hu.js similarity index 100% rename from InvenTree/static/script/select2/i18n/hu.js rename to InvenTree/InvenTree/static/script/select2/i18n/hu.js diff --git a/InvenTree/static/script/select2/i18n/hy.js b/InvenTree/InvenTree/static/script/select2/i18n/hy.js similarity index 100% rename from InvenTree/static/script/select2/i18n/hy.js rename to InvenTree/InvenTree/static/script/select2/i18n/hy.js diff --git a/InvenTree/static/script/select2/i18n/id.js b/InvenTree/InvenTree/static/script/select2/i18n/id.js similarity index 100% rename from InvenTree/static/script/select2/i18n/id.js rename to InvenTree/InvenTree/static/script/select2/i18n/id.js diff --git a/InvenTree/static/script/select2/i18n/is.js b/InvenTree/InvenTree/static/script/select2/i18n/is.js similarity index 100% rename from InvenTree/static/script/select2/i18n/is.js rename to InvenTree/InvenTree/static/script/select2/i18n/is.js diff --git a/InvenTree/static/script/select2/i18n/it.js b/InvenTree/InvenTree/static/script/select2/i18n/it.js similarity index 100% rename from InvenTree/static/script/select2/i18n/it.js rename to InvenTree/InvenTree/static/script/select2/i18n/it.js diff --git a/InvenTree/static/script/select2/i18n/ja.js b/InvenTree/InvenTree/static/script/select2/i18n/ja.js similarity index 100% rename from InvenTree/static/script/select2/i18n/ja.js rename to InvenTree/InvenTree/static/script/select2/i18n/ja.js diff --git a/InvenTree/static/script/select2/i18n/km.js b/InvenTree/InvenTree/static/script/select2/i18n/km.js similarity index 100% rename from InvenTree/static/script/select2/i18n/km.js rename to InvenTree/InvenTree/static/script/select2/i18n/km.js diff --git a/InvenTree/static/script/select2/i18n/ko.js b/InvenTree/InvenTree/static/script/select2/i18n/ko.js similarity index 100% rename from InvenTree/static/script/select2/i18n/ko.js rename to InvenTree/InvenTree/static/script/select2/i18n/ko.js diff --git a/InvenTree/static/script/select2/i18n/lt.js b/InvenTree/InvenTree/static/script/select2/i18n/lt.js similarity index 100% rename from InvenTree/static/script/select2/i18n/lt.js rename to InvenTree/InvenTree/static/script/select2/i18n/lt.js diff --git a/InvenTree/static/script/select2/i18n/lv.js b/InvenTree/InvenTree/static/script/select2/i18n/lv.js similarity index 100% rename from InvenTree/static/script/select2/i18n/lv.js rename to InvenTree/InvenTree/static/script/select2/i18n/lv.js diff --git a/InvenTree/static/script/select2/i18n/mk.js b/InvenTree/InvenTree/static/script/select2/i18n/mk.js similarity index 100% rename from InvenTree/static/script/select2/i18n/mk.js rename to InvenTree/InvenTree/static/script/select2/i18n/mk.js diff --git a/InvenTree/static/script/select2/i18n/ms.js b/InvenTree/InvenTree/static/script/select2/i18n/ms.js similarity index 100% rename from InvenTree/static/script/select2/i18n/ms.js rename to InvenTree/InvenTree/static/script/select2/i18n/ms.js diff --git a/InvenTree/static/script/select2/i18n/nb.js b/InvenTree/InvenTree/static/script/select2/i18n/nb.js similarity index 100% rename from InvenTree/static/script/select2/i18n/nb.js rename to InvenTree/InvenTree/static/script/select2/i18n/nb.js diff --git a/InvenTree/static/script/select2/i18n/nl.js b/InvenTree/InvenTree/static/script/select2/i18n/nl.js similarity index 100% rename from InvenTree/static/script/select2/i18n/nl.js rename to InvenTree/InvenTree/static/script/select2/i18n/nl.js diff --git a/InvenTree/static/script/select2/i18n/pl.js b/InvenTree/InvenTree/static/script/select2/i18n/pl.js similarity index 100% rename from InvenTree/static/script/select2/i18n/pl.js rename to InvenTree/InvenTree/static/script/select2/i18n/pl.js diff --git a/InvenTree/static/script/select2/i18n/ps.js b/InvenTree/InvenTree/static/script/select2/i18n/ps.js similarity index 100% rename from InvenTree/static/script/select2/i18n/ps.js rename to InvenTree/InvenTree/static/script/select2/i18n/ps.js diff --git a/InvenTree/static/script/select2/i18n/pt-BR.js b/InvenTree/InvenTree/static/script/select2/i18n/pt-BR.js similarity index 100% rename from InvenTree/static/script/select2/i18n/pt-BR.js rename to InvenTree/InvenTree/static/script/select2/i18n/pt-BR.js diff --git a/InvenTree/static/script/select2/i18n/pt.js b/InvenTree/InvenTree/static/script/select2/i18n/pt.js similarity index 100% rename from InvenTree/static/script/select2/i18n/pt.js rename to InvenTree/InvenTree/static/script/select2/i18n/pt.js diff --git a/InvenTree/static/script/select2/i18n/ro.js b/InvenTree/InvenTree/static/script/select2/i18n/ro.js similarity index 100% rename from InvenTree/static/script/select2/i18n/ro.js rename to InvenTree/InvenTree/static/script/select2/i18n/ro.js diff --git a/InvenTree/static/script/select2/i18n/ru.js b/InvenTree/InvenTree/static/script/select2/i18n/ru.js similarity index 100% rename from InvenTree/static/script/select2/i18n/ru.js rename to InvenTree/InvenTree/static/script/select2/i18n/ru.js diff --git a/InvenTree/static/script/select2/i18n/sk.js b/InvenTree/InvenTree/static/script/select2/i18n/sk.js similarity index 100% rename from InvenTree/static/script/select2/i18n/sk.js rename to InvenTree/InvenTree/static/script/select2/i18n/sk.js diff --git a/InvenTree/static/script/select2/i18n/sl.js b/InvenTree/InvenTree/static/script/select2/i18n/sl.js similarity index 100% rename from InvenTree/static/script/select2/i18n/sl.js rename to InvenTree/InvenTree/static/script/select2/i18n/sl.js diff --git a/InvenTree/static/script/select2/i18n/sr-Cyrl.js b/InvenTree/InvenTree/static/script/select2/i18n/sr-Cyrl.js similarity index 100% rename from InvenTree/static/script/select2/i18n/sr-Cyrl.js rename to InvenTree/InvenTree/static/script/select2/i18n/sr-Cyrl.js diff --git a/InvenTree/static/script/select2/i18n/sr.js b/InvenTree/InvenTree/static/script/select2/i18n/sr.js similarity index 100% rename from InvenTree/static/script/select2/i18n/sr.js rename to InvenTree/InvenTree/static/script/select2/i18n/sr.js diff --git a/InvenTree/static/script/select2/i18n/sv.js b/InvenTree/InvenTree/static/script/select2/i18n/sv.js similarity index 100% rename from InvenTree/static/script/select2/i18n/sv.js rename to InvenTree/InvenTree/static/script/select2/i18n/sv.js diff --git a/InvenTree/static/script/select2/i18n/th.js b/InvenTree/InvenTree/static/script/select2/i18n/th.js similarity index 100% rename from InvenTree/static/script/select2/i18n/th.js rename to InvenTree/InvenTree/static/script/select2/i18n/th.js diff --git a/InvenTree/static/script/select2/i18n/tr.js b/InvenTree/InvenTree/static/script/select2/i18n/tr.js similarity index 100% rename from InvenTree/static/script/select2/i18n/tr.js rename to InvenTree/InvenTree/static/script/select2/i18n/tr.js diff --git a/InvenTree/static/script/select2/i18n/uk.js b/InvenTree/InvenTree/static/script/select2/i18n/uk.js similarity index 100% rename from InvenTree/static/script/select2/i18n/uk.js rename to InvenTree/InvenTree/static/script/select2/i18n/uk.js diff --git a/InvenTree/static/script/select2/i18n/vi.js b/InvenTree/InvenTree/static/script/select2/i18n/vi.js similarity index 100% rename from InvenTree/static/script/select2/i18n/vi.js rename to InvenTree/InvenTree/static/script/select2/i18n/vi.js diff --git a/InvenTree/static/script/select2/i18n/zh-CN.js b/InvenTree/InvenTree/static/script/select2/i18n/zh-CN.js similarity index 100% rename from InvenTree/static/script/select2/i18n/zh-CN.js rename to InvenTree/InvenTree/static/script/select2/i18n/zh-CN.js diff --git a/InvenTree/static/script/select2/i18n/zh-TW.js b/InvenTree/InvenTree/static/script/select2/i18n/zh-TW.js similarity index 100% rename from InvenTree/static/script/select2/i18n/zh-TW.js rename to InvenTree/InvenTree/static/script/select2/i18n/zh-TW.js diff --git a/InvenTree/static/script/select2/select2.full.js b/InvenTree/InvenTree/static/script/select2/select2.full.js similarity index 100% rename from InvenTree/static/script/select2/select2.full.js rename to InvenTree/InvenTree/static/script/select2/select2.full.js diff --git a/InvenTree/static/script/select2/select2.full.min.js b/InvenTree/InvenTree/static/script/select2/select2.full.min.js similarity index 100% rename from InvenTree/static/script/select2/select2.full.min.js rename to InvenTree/InvenTree/static/script/select2/select2.full.min.js diff --git a/InvenTree/static/script/select2/select2.js b/InvenTree/InvenTree/static/script/select2/select2.js similarity index 100% rename from InvenTree/static/script/select2/select2.js rename to InvenTree/InvenTree/static/script/select2/select2.js diff --git a/InvenTree/static/script/select2/select2.min.js b/InvenTree/InvenTree/static/script/select2/select2.min.js similarity index 100% rename from InvenTree/static/script/select2/select2.min.js rename to InvenTree/InvenTree/static/script/select2/select2.min.js From d0e1dc52f8517edc2c28609ae92c62bfc9fdebac Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 11 Jul 2019 23:57:07 +1000 Subject: [PATCH 11/13] Example gunicorn conf file --- .gitignore | 3 ++- InvenTree/gunicorn.conf.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 InvenTree/gunicorn.conf.py diff --git a/.gitignore b/.gitignore index f251804992..8cf83e1908 100644 --- a/.gitignore +++ b/.gitignore @@ -31,8 +31,9 @@ local_settings.py # Sphinx files docs/_build -# Local media storage (only when running in development mode) +# Local static and media file storage (only when running in development mode) InvenTree/media +InvenTree/static # Key file secret_key.txt diff --git a/InvenTree/gunicorn.conf.py b/InvenTree/gunicorn.conf.py new file mode 100644 index 0000000000..a117c05144 --- /dev/null +++ b/InvenTree/gunicorn.conf.py @@ -0,0 +1,5 @@ +import multiprocessing + +bind = "0.0.0.0:8000" + +workers = multiprocessing.cpu_count() * 2 + 1 \ No newline at end of file From 04efa2ece88789df4105b5d2ecbeccb81bc157f9 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 12 Jul 2019 00:14:40 +1000 Subject: [PATCH 12/13] Add simple deployment documentation --- docs/deploy.rst | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 1 + 2 files changed, 53 insertions(+) create mode 100644 docs/deploy.rst diff --git a/docs/deploy.rst b/docs/deploy.rst new file mode 100644 index 0000000000..3e12368986 --- /dev/null +++ b/docs/deploy.rst @@ -0,0 +1,52 @@ +Deploying InvenTree +=================== + +.. toctree:: + :titlesonly: + :maxdepth: 2 + :caption: Deployment + :hidden: + +The development server provided by the Django ecosystem may be fine for a testing environment or small contained setups. However special consideration must be given when deploying InvenTree in a real-world environment. + +Django apps provide multiple deployment methods - see the `Django documentation `_. + +There are also numerous online tutorials describing how to deploy a Django application either locally or on an online platform. + +Following is a simple tutorial on serving InvenTree using `Gunicorn `_. Gunicorn is a Python WSGI server which provides a multi-worker server which is much better suited to handling multiple simultaneous requests. + +Install Gunicorn +---------------- + +Gunicorn can be installed using PIP: + +`pip3 install gunicorn` + + +Configure Static Directories +---------------------------- + +Directories for storing *media* files and *static* files should be specified in the ``config.yaml`` configuration file. These directories are the ``MEDIA_ROOT`` and ``STATIC_ROOT`` paths required by the Django app. + +Collect Static Files +-------------------- + +The required static files must be collected into the specified ``STATIC_ROOT`` directory. Run ``python3 manage.py collectstatic`` + +Configure Gunicorn +------------------ + +The Gunicorn server can be configured with a simple configuration file (e.g. python script). An example configuration file is provided in ``InvenTree/gunicorn.conf.py`` + +.. literalinclude :: ../InvenTree/gunicorn.conf.py + :language: python + :linenos: + +This file can be used to configure the Gunicorn server to match particular requirements. + +Run Gunicorn +------------ + +From the directory where ``manage.py`` is located: + +Run ``gunicorn -c gunicorn.conf.py InvenTree.wsgi`` \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index e7a4f52bad..c90ff2fe25 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,6 +9,7 @@ InvenTree Source Documentation Getting Started Configuration + Deployment Modal Forms Tables REST API From 31e6aa69063287f9b16fbdb8303b15a438f0ff3e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 12 Jul 2019 00:15:47 +1000 Subject: [PATCH 13/13] doc fix --- InvenTree/gunicorn.conf.py | 2 +- docs/deploy.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/gunicorn.conf.py b/InvenTree/gunicorn.conf.py index a117c05144..aeee2a366b 100644 --- a/InvenTree/gunicorn.conf.py +++ b/InvenTree/gunicorn.conf.py @@ -2,4 +2,4 @@ import multiprocessing bind = "0.0.0.0:8000" -workers = multiprocessing.cpu_count() * 2 + 1 \ No newline at end of file +workers = multiprocessing.cpu_count() * 2 + 1 diff --git a/docs/deploy.rst b/docs/deploy.rst index 3e12368986..2ce5e7b255 100644 --- a/docs/deploy.rst +++ b/docs/deploy.rst @@ -20,7 +20,7 @@ Install Gunicorn Gunicorn can be installed using PIP: -`pip3 install gunicorn` +``pip3 install gunicorn`` Configure Static Directories