settings: get select2 from xstatic (#17092)
This commit is contained in:
parent
be3cf50d2c
commit
1ff6541fd0
|
@ -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:
|
||||
|
|
3
setup.py
3
setup.py
|
@ -94,7 +94,8 @@ setup(name="bijoe",
|
|||
include_package_data=True,
|
||||
install_requires=['requests', 'django', 'psycopg2', 'isodate', 'Django-Select2<6',
|
||||
'XStatic-ChartNew.js', 'gadjo', 'django-jsonfield',
|
||||
'python-dateutil', 'djangorestframework<3.4'],
|
||||
'python-dateutil', 'djangorestframework<3.4',
|
||||
'xstatic-select2'],
|
||||
scripts=['manage.py'],
|
||||
cmdclass={
|
||||
'sdist': eo_sdist,
|
||||
|
|
Loading…
Reference in New Issue