From f052d518ea37dde21bb575c7826ac995e42ea29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 21 Jun 2017 22:39:56 +0200 Subject: [PATCH] settings: get select2 from xstatic (#17092) --- bijoe/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bijoe/settings.py b/bijoe/settings.py index 940e1f3..3b8014d 100644 --- a/bijoe/settings.py +++ b/bijoe/settings.py @@ -28,6 +28,8 @@ from itertools import chain from django.conf import global_settings import django +from gadjo.templatetags.gadjo import xstatic + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -57,6 +59,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'xstatic.pkg.chartnew_js', + 'xstatic.pkg.select2', 'django_select2', 'gadjo', 'rest_framework', @@ -165,6 +168,9 @@ if django.VERSION >= (1, 10): # Django-Select2 AUTO_RENDER_SELECT2_STATICS = False +SELECT2_JS = xstatic('select2', 'select2.min.js') +SELECT2_CSS = xstatic('select2', 'select2.min.css') + BIJOE_SCHEMAS = [] if 'BIJOE_SETTINGS_FILE' in os.environ: -- 2.11.0