replace use of django-select2 by xstatic-select2

This commit is contained in:
Benjamin Dauvergne 2017-03-07 23:30:45 +01:00
parent 44d4464ac5
commit c2e7a2fb69
4 changed files with 6 additions and 4 deletions

1
debian/control vendored
View File

@ -26,6 +26,7 @@ Depends: ${misc:Depends},
python-django-tenant-schemas,
python-psycopg2,
python-django-mellon,
python-xstatic-select2,
gunicorn,
graphicsmagick
Recommends: nginx, postgresql

View File

@ -99,13 +99,13 @@ setup(
],
install_requires=['django>=1.7, <1.9',
'gadjo',
'django-select2',
'django-ckeditor<4.5.3',
'django-haystack',
'django-reversion==1.8.7',
'django-taggit',
'requests',
'whoosh',
'XStatic-Select2',
],
zip_safe=False,
cmdclass={

View File

@ -41,7 +41,6 @@ INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_select2',
'ckeditor',
'haystack',
'reversion',
@ -53,6 +52,7 @@ INSTALLED_APPS = (
'welco.kb',
'welco.contacts',
'gadjo',
'xstatic.pkg.select2',
)
MIDDLEWARE_CLASSES = (

View File

@ -1,5 +1,5 @@
{% extends "gadjo/base.html" %}
{% load i18n static django_select2_tags %}
{% load i18n static gadjo %}
{% block page-title %}{% firstof site_title "Welco" %}{% endblock %}
{% block site-title %}{% firstof site_title "Welco" %}{% endblock %}
@ -19,5 +19,6 @@
{{ block.super }}
<script src="{% static "js/datepicker-fr.js" %}"></script>
<script src="{% static "js/welco.js" %}"></script>
{% import_django_select2_js_css %}
<script src="{% xstatic "select2.js" "select2.min.js" %}"></script>
<link rel="stylesheet" href="{% xstatic "select2.css" "select2.min.css" %}"/>
{% endblock %}