├── .gitignore ├── .openshift ├── README.md ├── action_hooks │ ├── README.md │ └── deploy └── cron │ ├── README.cron │ └── hourly │ └── reset_database ├── .readthedocs.yaml ├── .travis.yml ├── AUTHORS ├── CHANGELOG ├── CHANGES.txt ├── LICENSE ├── MANIFEST.in ├── README ├── README.rst ├── changelog.py ├── conftest.py ├── docs ├── Makefile ├── _ext │ └── djangodocs.py ├── api.rst ├── conf.py ├── genericm2m.rst ├── gfk.rst ├── gm2m.rst ├── img │ ├── all.png │ ├── autocomplete.png │ ├── create_option.png │ ├── created_option.png │ ├── mine.png │ └── view.png ├── index.rst ├── install.rst ├── requirements.txt ├── tagging.rst ├── taggit.rst └── tutorial.rst ├── package-lock.json ├── package.json ├── pytest.ini ├── release.sh ├── select2.build.js ├── setup.py ├── src ├── __init__.py ├── dal │ ├── __init__.py │ ├── autocomplete.py │ ├── forms.py │ ├── forward.py │ ├── static │ │ └── autocomplete_light │ │ │ ├── autocomplete_light.js │ │ │ ├── autocomplete_light.min.js │ │ │ ├── autocomplete_light.min.js.map │ │ │ └── i18n │ │ │ ├── af.js │ │ │ ├── ar.js │ │ │ ├── az.js │ │ │ ├── bg.js │ │ │ ├── bn.js │ │ │ ├── bs.js │ │ │ ├── ca.js │ │ │ ├── cs.js │ │ │ ├── da.js │ │ │ ├── de.js │ │ │ ├── dsb.js │ │ │ ├── el.js │ │ │ ├── en.js │ │ │ ├── eo.js │ │ │ ├── es.js │ │ │ ├── et.js │ │ │ ├── eu.js │ │ │ ├── fa.js │ │ │ ├── fi.js │ │ │ ├── fr.js │ │ │ ├── gl.js │ │ │ ├── he.js │ │ │ ├── hi.js │ │ │ ├── hr.js │ │ │ ├── hsb.js │ │ │ ├── hu.js │ │ │ ├── hy.js │ │ │ ├── id.js │ │ │ ├── is.js │ │ │ ├── it.js │ │ │ ├── ja.js │ │ │ ├── ka.js │ │ │ ├── km.js │ │ │ ├── ko.js │ │ │ ├── lt.js │ │ │ ├── lv.js │ │ │ ├── mk.js │ │ │ ├── ms.js │ │ │ ├── nb.js │ │ │ ├── ne.js │ │ │ ├── nl.js │ │ │ ├── pa.js │ │ │ ├── pl.js │ │ │ ├── ps.js │ │ │ ├── pt-BR.js │ │ │ ├── pt.js │ │ │ ├── ro.js │ │ │ ├── ru.js │ │ │ ├── sk.js │ │ │ ├── sl.js │ │ │ ├── sq.js │ │ │ ├── sr-Cyrl.js │ │ │ ├── sr.js │ │ │ ├── sv.js │ │ │ ├── te.js │ │ │ ├── th.js │ │ │ ├── tk.js │ │ │ ├── tr.js │ │ │ ├── uk.js │ │ │ ├── vi.js │ │ │ ├── zh-CN.js │ │ │ └── zh-TW.js │ ├── test │ │ ├── __init__.py │ │ ├── case.py │ │ ├── stories.py │ │ └── utils.py │ ├── views.py │ └── widgets.py ├── dal_contenttypes │ ├── __init__.py │ └── fields.py ├── dal_genericm2m │ ├── __init__.py │ └── fields.py ├── dal_genericm2m_queryset_sequence │ ├── __init__.py │ └── fields.py ├── dal_gm2m │ ├── __init__.py │ └── fields.py ├── dal_gm2m_queryset_sequence │ ├── __init__.py │ └── fields.py ├── dal_legacy_static │ ├── __init__.py │ └── static │ │ └── admin │ │ ├── css │ │ ├── autocomplete.css │ │ └── vendor │ │ │ └── select2 │ │ │ ├── LICENSE-SELECT2.md │ │ │ ├── select2.css │ │ │ └── select2.min.css │ │ └── js │ │ ├── autocomplete.js │ │ └── vendor │ │ └── select2 │ │ ├── LICENSE.md │ │ ├── i18n │ │ ├── ar.js │ │ ├── az.js │ │ ├── bg.js │ │ ├── ca.js │ │ ├── cs.js │ │ ├── da.js │ │ ├── de.js │ │ ├── el.js │ │ ├── en.js │ │ ├── es.js │ │ ├── et.js │ │ ├── eu.js │ │ ├── fa.js │ │ ├── fi.js │ │ ├── fr.js │ │ ├── gl.js │ │ ├── he.js │ │ ├── hi.js │ │ ├── hr.js │ │ ├── hu.js │ │ ├── id.js │ │ ├── is.js │ │ ├── it.js │ │ ├── ja.js │ │ ├── km.js │ │ ├── ko.js │ │ ├── lt.js │ │ ├── lv.js │ │ ├── mk.js │ │ ├── ms.js │ │ ├── nb.js │ │ ├── nl.js │ │ ├── pl.js │ │ ├── pt-BR.js │ │ ├── pt.js │ │ ├── ro.js │ │ ├── ru.js │ │ ├── sk.js │ │ ├── sr-Cyrl.js │ │ ├── sr.js │ │ ├── sv.js │ │ ├── th.js │ │ ├── tr.js │ │ ├── uk.js │ │ ├── vi.js │ │ ├── zh-CN.js │ │ └── zh-TW.js │ │ ├── select2.full.js │ │ └── select2.full.min.js ├── dal_queryset_sequence │ ├── __init__.py │ ├── fields.py │ ├── tests │ │ └── test_views.py │ ├── views.py │ └── widgets.py ├── dal_select2 │ ├── __init__.py │ ├── apps.py │ ├── fields.py │ ├── locale │ │ ├── bg │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── cs │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── de │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── es │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── fi │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── fr │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── it │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── ja │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── nl │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── pl │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── pt-br │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── ru │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── tr │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ ├── uk │ │ │ └── LC_MESSAGES │ │ │ │ ├── django.mo │ │ │ │ └── django.po │ │ └── zh-cn │ │ │ └── LC_MESSAGES │ │ │ ├── django.mo │ │ │ └── django.po │ ├── models.py │ ├── static │ │ └── autocomplete_light │ │ │ ├── select2.css │ │ │ ├── select2.js │ │ │ ├── select2.min.js │ │ │ └── select2.min.js.map │ ├── test.py │ ├── views.py │ └── widgets.py ├── dal_select2_queryset_sequence │ ├── __init__.py │ ├── fields.py │ ├── views.py │ └── widgets.py ├── dal_select2_tagging │ ├── __init__.py │ └── widgets.py └── dal_select2_taggit │ ├── __init__.py │ └── widgets.py ├── test_project ├── .coveragerc ├── custom_select2 │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── static │ │ └── t_select2.js │ ├── test_functional.py │ ├── urls.py │ └── widgets.py ├── forward_different_fields │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── static │ │ └── js_handlers.js │ ├── tests.py │ └── urls.py ├── linked_data │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── static │ │ └── linked_data.js │ ├── test_forms.py │ ├── test_functional.py │ ├── test_views.py │ └── urls.py ├── manage.py ├── rename_forward │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── static │ │ └── linked_data.js │ ├── test_functional.py │ └── urls.py ├── requirements.txt ├── secure_data │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_functional.py │ ├── urls.py │ └── views.py ├── select2_djhacker_formfield │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_functional.py │ └── urls.py ├── select2_foreign_key │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_functional.py │ └── urls.py ├── select2_generic_foreign_key │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_forms.py │ ├── test_functional.py │ ├── test_views.py │ ├── urls.py │ └── views.py ├── select2_generic_m2m │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── models.py │ ├── test_forms.py │ ├── test_functional.py │ ├── urls.py │ └── views.py ├── select2_gm2m │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── models.py │ ├── test_forms.py │ ├── test_functional.py │ ├── urls.py │ └── views.py ├── select2_list │ ├── __init__.py │ ├── admin.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_fields.py │ ├── test_functional.py │ ├── test_views.py │ ├── urls.py │ └── views.py ├── select2_many_to_many │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_functional.py │ └── urls.py ├── select2_nestedadmin │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_functional.py │ └── urls.py ├── select2_one_to_one │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_functional.py │ └── urls.py ├── select2_outside_admin │ ├── __init__.py │ ├── templates │ │ └── select2_outside_admin.html │ ├── urls.py │ └── views.py ├── select2_tagging │ ├── __init__.py │ ├── admin.py │ ├── forms.py │ ├── models.py │ ├── test_forms.py │ ├── test_functional.py │ └── urls.py ├── select2_taggit │ ├── __init__.py │ ├── admin.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── test_forms.py │ ├── test_functional.py │ └── urls.py ├── settings │ ├── __init__.py │ └── base.py ├── templates │ ├── admin │ │ └── login.html │ └── base.html ├── tests │ ├── __init__.py │ ├── admin.py │ ├── models.py │ └── test_widgets.py ├── urls.py ├── views.py └── wsgi.py └── tox.ini /.gitignore: -------------------------------------------------------------------------------- 1 | *pyc 2 | docs/build 3 | docs/source/_static 4 | test_project/htmlcov/ 5 | test_project/.coverage 6 | build 7 | dist 8 | django_autocomplete_light.egg-info/ 9 | *swp 10 | docs/docs 11 | __pycache__ 12 | test_env/ 13 | .coverage 14 | .tox 15 | node_modules 16 | 17 | .cache/ 18 | 19 | # Pycharm 20 | .idea/ 21 | -------------------------------------------------------------------------------- /.openshift/README.md: -------------------------------------------------------------------------------- 1 | The OpenShift `python` cartridge documentation can be found at: 2 | http://openshift.github.io/documentation/oo_cartridge_guide.html#python 3 | 4 | For information about .openshift directory, consult the documentation: 5 | http://openshift.github.io/documentation/oo_user_guide.html#the-openshift-directory 6 | -------------------------------------------------------------------------------- /.openshift/action_hooks/README.md: -------------------------------------------------------------------------------- 1 | For information about action hooks, consult the documentation: 2 | 3 | http://openshift.github.io/documentation/oo_user_guide.html#action-hooks 4 | -------------------------------------------------------------------------------- /.openshift/action_hooks/deploy: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This deploy hook gets executed after dependencies are resolved and the 3 | # build hook has been run but before the application has been started back 4 | # up again. This script gets executed directly, so it could be python, php, 5 | # ruby, etc. 6 | set -xe 7 | 8 | source ${OPENSHIFT_HOMEDIR}app-root/runtime/dependencies/python/virtenv/bin/activate 9 | 10 | pip install -U pip 11 | 12 | pip install -r ${OPENSHIFT_REPO_DIR}test_project/requirements.txt 13 | 14 | # Broken dep pulled in by taggit 15 | if pip freeze | grep south; then 16 | pip uninstall -y south 17 | fi 18 | 19 | pushd ${OPENSHIFT_REPO_DIR}test_project 20 | ./manage.py migrate --fake-initial --noinput 21 | mkdir -p wsgi 22 | ./manage.py collectstatic --noinput 23 | popd 24 | 25 | mkdir -p ${OPENSHIFT_DATA_DIR}media 26 | mkdir -p ${OPENSHIFT_REPO_DIR}wsgi/static/media 27 | ln -sf ${OPENSHIFT_DATA_DIR}media ${OPENSHIFT_REPO_DIR}wsgi/static/media 28 | -------------------------------------------------------------------------------- /.openshift/cron/hourly/reset_database: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | 4 | source ${OPENSHIFT_HOMEDIR}app-root/runtime/dependencies/python/virtenv/bin/activate 5 | 6 | pushd ${OPENSHIFT_REPO_DIR}test_project 7 | rm -rf db.sqlite 8 | ./manage.py migrate --noinput 9 | popd 10 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 2 | 3 | # Required 4 | version: 2 5 | 6 | # Set the version of Python and other tools you might need 7 | build: 8 | os: ubuntu-20.04 9 | tools: 10 | python: "3.9" 11 | 12 | # Build documentation in the docs/ directory with Sphinx 13 | sphinx: 14 | configuration: docs/conf.py 15 | 16 | # If using Sphinx, optionally build your docs in additional formats such as PDF 17 | # formats: 18 | # - pdf 19 | 20 | # Optionally declare the Python requirements required to build your docs 21 | python: 22 | install: 23 | - requirements: docs/requirements.txt 24 | -------------------------------------------------------------------------------- /CHANGES.txt: -------------------------------------------------------------------------------- 1 | CHANGELOG -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2011 James Pic and contributors. 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.rst *.txt README LICENSE AUTHORS CHANGELOG 2 | recursive-include src *.html *.css *.js *.py *.po *.mo *.json *.png *.gif *.otf *.eot *.svg *.ttf *.woff 3 | prune src/dal_select2/static/autocomplete_light/vendor/select2/docs 4 | prune src/dal_select2/static/autocomplete_light/vendor/select2/node_modules 5 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | README -------------------------------------------------------------------------------- /conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import os 3 | 4 | 5 | @pytest.fixture(scope='session') 6 | def splinter_webdriver(): 7 | """Override splinter webdriver name with BROWSER env variable.""" 8 | return os.environ.get('BROWSER', 'firefox') 9 | -------------------------------------------------------------------------------- /docs/_ext/djangodocs.py: -------------------------------------------------------------------------------- 1 | def setup(app): 2 | app.add_crossref_type( 3 | directivename = "setting", 4 | rolename = "setting", 5 | indextemplate = "pair: %s; setting", 6 | ) 7 | app.add_crossref_type( 8 | directivename = "ref", 9 | rolename = "ref", 10 | indextemplate = "pair: %s; ref", 11 | ) 12 | app.add_crossref_type( 13 | directivename = "doc", 14 | rolename = "doc", 15 | indextemplate = "pair: %s; doc", 16 | ) 17 | app.add_crossref_type( 18 | directivename = "label", 19 | rolename = "label", 20 | indextemplate = "pair: %s; label", 21 | ) 22 | -------------------------------------------------------------------------------- /docs/img/all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/docs/img/all.png -------------------------------------------------------------------------------- /docs/img/autocomplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/docs/img/autocomplete.png -------------------------------------------------------------------------------- /docs/img/create_option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/docs/img/create_option.png -------------------------------------------------------------------------------- /docs/img/created_option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/docs/img/created_option.png -------------------------------------------------------------------------------- /docs/img/mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/docs/img/mine.png -------------------------------------------------------------------------------- /docs/img/view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/docs/img/view.png -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. django-autocomplete-light documentation master file, created by 2 | sphinx-quickstart on Wed Feb 3 02:03:57 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to django-autocomplete-light's documentation! 7 | ===================================================== 8 | 9 | .. include:: ../README.rst 10 | 11 | Basics 12 | ------ 13 | 14 | .. toctree:: 15 | :maxdepth: 2 16 | 17 | install 18 | tutorial 19 | 20 | External app support 21 | -------------------- 22 | 23 | .. toctree:: 24 | :maxdepth: 2 25 | 26 | gfk 27 | gm2m 28 | genericm2m 29 | tagging 30 | taggit 31 | 32 | API 33 | --- 34 | 35 | .. toctree:: 36 | :maxdepth: 1 37 | 38 | api 39 | 40 | Indices and tables 41 | ================== 42 | 43 | * :ref:`genindex` 44 | * :ref:`modindex` 45 | * :ref:`search` 46 | 47 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | furo 2 | django 3 | -r ../test_project/requirements.txt 4 | -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | addopts = --nomigrations --create-db --reuse-db 3 | DJANGO_SETTINGS_MODULE=settings.base 4 | django_debug_mode=true 5 | -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- 1 | """Optional dependencies for DAL.""" 2 | -------------------------------------------------------------------------------- /src/dal/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Welcome to django-autocomplete-light. 3 | 4 | For examples, see the test_project/ directory of the repository. 5 | """ 6 | -------------------------------------------------------------------------------- /src/dal/static/autocomplete_light/i18n/af.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | var dalLoadLanguage=function(e){var n;(n=e&&e.fn&&e.fn.select2&&e.fn.select2.amd?e.fn.select2.amd:n).define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,e="Verwyders asseblief "+n+" character";return 1!=n&&(e+="s"),e},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),n.define,n.require},event=new CustomEvent("dal-language-loaded",{lang:"af"});document.dispatchEvent(event); -------------------------------------------------------------------------------- /src/dal/static/autocomplete_light/i18n/ar.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | var dalLoadLanguage=function(n){var e;(e=n&&n.fn&&n.fn.select2&&n.fn.select2.amd?n.fn.select2.amd:e).define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return"الرجاء حذف "+(n.input.length-n.maximum)+" عناصر"},inputTooShort:function(n){return"الرجاء إضافة "+(n.minimum-n.input.length)+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(n){return"تستطيع إختيار "+n.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"},removeAllItems:function(){return"قم بإزالة كل العناصر"}}}),e.define,e.require},event=new CustomEvent("dal-language-loaded",{lang:"ar"});document.dispatchEvent(event); -------------------------------------------------------------------------------- /src/dal/static/autocomplete_light/i18n/az.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | var dalLoadLanguage=function(n){var e;(e=n&&n.fn&&n.fn.select2&&n.fn.select2.amd?n.fn.select2.amd:e).define("select2/i18n/az",[],function(){return{inputTooLong:function(n){return n.input.length-n.maximum+" simvol silin"},inputTooShort:function(n){return n.minimum-n.input.length+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(n){return"Sadəcə "+n.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"},removeAllItems:function(){return"Bütün elementləri sil"}}}),e.define,e.require},event=new CustomEvent("dal-language-loaded",{lang:"az"});document.dispatchEvent(event); -------------------------------------------------------------------------------- /src/dal/static/autocomplete_light/i18n/bg.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | var dalLoadLanguage=function(n){var e;(e=n&&n.fn&&n.fn.select2&&n.fn.select2.amd?n.fn.select2.amd:e).define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,n="Моля въведете с "+e+" по-малко символ";return 11&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/ca.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/cs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/da.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/de.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/el.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/en.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/es.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/et.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/eu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/fa.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/fi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/fr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/gl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/he.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/hi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/hr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/hu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/id.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/is.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/it.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/ja.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/km.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/ko.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/lt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/lv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/mk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/ms.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/nb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/nl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/pl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/pt-BR.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/pt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/ro.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/ru.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/sk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/sr-Cyrl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/sr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/sv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/th.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/tr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/uk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/vi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/zh-CN.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_legacy_static/static/admin/js/vendor/select2/i18n/zh-TW.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /src/dal_queryset_sequence/__init__.py: -------------------------------------------------------------------------------- 1 | """QuerySetSequence support for DAL.""" 2 | -------------------------------------------------------------------------------- /src/dal_select2/__init__.py: -------------------------------------------------------------------------------- 1 | """Select2 support for DAL.""" 2 | import django 3 | 4 | if django.VERSION < (3, 2): # pragma: no cover 5 | default_app_config = 'dal_select2.apps.DefaultApp' 6 | -------------------------------------------------------------------------------- /src/dal_select2/apps.py: -------------------------------------------------------------------------------- 1 | """Default AppConfig for dal_select2.""" 2 | from django.apps import AppConfig 3 | # from django.core import checks 4 | 5 | 6 | class DefaultApp(AppConfig): 7 | """Default app for dal_select2.""" 8 | 9 | name = 'dal_select2' 10 | 11 | def ready(self): 12 | """Register select2_submodule_check.""" 13 | -------------------------------------------------------------------------------- /src/dal_select2/locale/bg/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/bg/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/bg/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 19:11+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: bg\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "Създавам \"%(new_value)s\"" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/cs/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/cs/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/cs/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 19:11+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: cs\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "Vytvořit \"%(new_value)s\"" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/de/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/de/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/de/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 19:11+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: de\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "\"%(new_value)s\" erstellen" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/es/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/es/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/es/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 19:11+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: es\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "Crear \"%(new_value)s\"" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/fi/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/fi/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/fi/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Antti Rummukainen 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2022-07-12 13:21+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: Antti Rummukainen \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: fi\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "Luo \"%(new_value)s\"" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/fr/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/fr/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/fr/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 19:11+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: fr\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "Créer \"%(new_value)s\"" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/it/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/it/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/it/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 18:59+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: it\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "Creare \"%(new_value)s\"" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/ja/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/ja/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/ja/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 18:59+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: ja\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "作ります \"%(new_value)s\"" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/nl/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/nl/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/nl/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 18:59+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: nl\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #: views.py:39 20 | #, python-format 21 | msgid "Create \"%(new_value)s\"" 22 | msgstr "Creëren \"%(new_value)s\"" 23 | -------------------------------------------------------------------------------- /src/dal_select2/locale/pl/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/pl/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/pl/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 18:59+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: pl\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " 18 | "|| n%100>=20) ? 1 : 2);\n" 19 | 20 | #: views.py:39 21 | #, python-format 22 | msgid "Create \"%(new_value)s\"" 23 | msgstr "Stwórz \"%(new_value)s\"" 24 | -------------------------------------------------------------------------------- /src/dal_select2/locale/pt-br/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/pt-br/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/pt-br/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 18:59+0300\n" 10 | "PO-Revision-Date: 2019-03-27 21:37-0300\n" 11 | "Last-Translator: Tiago Gomes \n" 12 | "Language: pt_BR\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 17 | "Language-Team: \n" 18 | "X-Generator: Poedit 2.2.1\n" 19 | 20 | #: views.py:39 21 | #, python-format 22 | msgid "Create \"%(new_value)s\"" 23 | msgstr "Criar \"%(new_value)s\"" 24 | -------------------------------------------------------------------------------- /src/dal_select2/locale/ru/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/ru/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/ru/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 18:59+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: ru\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 18 | "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" 19 | "%100>=11 && n%100<=14)? 2 : 3);\n" 20 | 21 | #: views.py:39 22 | #, python-format 23 | msgid "Create \"%(new_value)s\"" 24 | msgstr "Создать \"%(new_value)s\"" 25 | -------------------------------------------------------------------------------- /src/dal_select2/locale/tr/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/tr/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/tr/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-12-25 11:53+0300\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 20 | #: .\dal_select2\views.py:39 21 | #, python-format 22 | msgid "Create \"%(new_value)s\"" 23 | msgstr "Oluştur \"%(new_value)s\"" 24 | -------------------------------------------------------------------------------- /src/dal_select2/locale/uk/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/uk/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/uk/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 18:59+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: uk\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 18 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 19 | 20 | #: views.py:39 21 | #, python-format 22 | msgid "Create \"%(new_value)s\"" 23 | msgstr "Створити \"%(new_value)s\"" 24 | -------------------------------------------------------------------------------- /src/dal_select2/locale/zh-cn/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/src/dal_select2/locale/zh-cn/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/dal_select2/locale/zh-cn/LC_MESSAGES/django.po: -------------------------------------------------------------------------------- 1 | # This file is distributed under the same license as the PACKAGE package. 2 | # 3 | # Translators: 4 | # Dima Kovalchuk 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: dal_select2\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-06-29 19:11+0300\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: DIMA KOVALCHUK \n" 12 | "Language-Team: LANGUAGE \n" 13 | "Language: zh-cn\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #: views.py:39 19 | #, python-format 20 | msgid "Create \"%(new_value)s\"" 21 | msgstr "创建 \"%(new_value)s\"" 22 | -------------------------------------------------------------------------------- /src/dal_select2/models.py: -------------------------------------------------------------------------------- 1 | """Empty module to look like a Django app.""" 2 | -------------------------------------------------------------------------------- /src/dal_select2_queryset_sequence/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django-autocomplete-light extension for django-querysetsequence. 3 | 4 | It provides view encapsulating business-logic for QuerySetSequence in 5 | :py:class:`~dal_queryset_sequence.views.BaseQuerySetSequenceView` as well as 6 | the widget encapsulating business logic for rendering only selected options in 7 | :py:class:~dal_queryset_sequence.widgets.QuerySetSequenceSelectMixin`. 8 | 9 | Add `dal_queryset_sequence` to INSTALLED_APPS to enable it in 10 | :py:mod:`dal.autocomplete` shortcut module. 11 | 12 | For example usage, refer to the ``select2_generic_foreign_key`` example app in 13 | the ``test_project``. 14 | """ 15 | -------------------------------------------------------------------------------- /src/dal_select2_queryset_sequence/widgets.py: -------------------------------------------------------------------------------- 1 | """ 2 | Widgets for Select2 and QuerySetSequence. 3 | 4 | They combine :py:class:`~dal_select2.widgets.Select2WidgetMixin` and 5 | :py:class:`~dal_queryset_sequence.widgets.QuerySetSequenceSelectMixin` with 6 | Django's Select and SelectMultiple widgets, and are meant to be used with 7 | generic model form fields such as those in :py:mod:`dal_contenttypes.fields`. 8 | """ 9 | 10 | from dal_queryset_sequence.widgets import QuerySetSequenceSelectMixin 11 | 12 | from dal_select2.widgets import Select2WidgetMixin 13 | 14 | from django import forms 15 | 16 | 17 | class QuerySetSequenceSelect2(Select2WidgetMixin, 18 | QuerySetSequenceSelectMixin, 19 | forms.Select): 20 | """Single model select for a generic select2 autocomplete.""" 21 | 22 | 23 | class QuerySetSequenceSelect2Multiple(Select2WidgetMixin, 24 | QuerySetSequenceSelectMixin, 25 | forms.SelectMultiple): 26 | """Multiple model select for a generic select2 autocomplete.""" 27 | -------------------------------------------------------------------------------- /src/dal_select2_tagging/__init__.py: -------------------------------------------------------------------------------- 1 | """DAL's Select2 and django-tagging extension.""" 2 | -------------------------------------------------------------------------------- /src/dal_select2_tagging/widgets.py: -------------------------------------------------------------------------------- 1 | """Widgets for Select2 and django-taggit.""" 2 | 3 | from dal_select2.widgets import TagSelect2 4 | 5 | from django import VERSION 6 | 7 | 8 | class TaggingSelect2(TagSelect2): 9 | """Select2 tag widget for tagging's TagField.""" 10 | 11 | def render_options(self, *args): 12 | """Render only selected tags.""" 13 | selected_choices_arg = 1 if VERSION < (1, 10) else 0 14 | 15 | selected_choices = args[selected_choices_arg] 16 | 17 | if selected_choices: 18 | # Here, selected_choices is a string of comma-separated tags: 19 | # that's how the tagging field works, otherwise it'd be an empty 20 | # list because that's how the select field uses for None values 21 | selected_choices = selected_choices.split(',') 22 | 23 | options = [ 24 | '' % (c, c) 25 | for c in selected_choices 26 | ] 27 | 28 | return '\n'.join(options) 29 | -------------------------------------------------------------------------------- /src/dal_select2_taggit/__init__.py: -------------------------------------------------------------------------------- 1 | """DAL's Select2 and Taggit extension.""" 2 | -------------------------------------------------------------------------------- /test_project/.coveragerc: -------------------------------------------------------------------------------- 1 | [report] 2 | omit = 3 | */.tox/* 4 | -------------------------------------------------------------------------------- /test_project/custom_select2/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'custom_select2.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/custom_select2/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/custom_select2/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import fixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'custom_select2' 9 | 10 | def ready(self): 11 | post_migrate.connect(fixtures, sender=self) 12 | -------------------------------------------------------------------------------- /test_project/custom_select2/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | from .models import TModel 4 | from .widgets import TModelSelect2 5 | 6 | 7 | class TForm(forms.ModelForm): 8 | class Meta: 9 | model = TModel 10 | fields = ('name', 'test') 11 | widgets = { 12 | 'test': TModelSelect2(url='select2_fk') 13 | } 14 | -------------------------------------------------------------------------------- /test_project/custom_select2/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-08 15:51 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='TModel', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('name', models.CharField(max_length=200)), 20 | ('for_inline', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inline_test_models', to='custom_select2.TModel')), 21 | ('test', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='related_test_models', to='custom_select2.TModel')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /test_project/custom_select2/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/custom_select2/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/custom_select2/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | test = models.ForeignKey( 8 | 'self', 9 | models.CASCADE, 10 | null=True, 11 | blank=True, 12 | related_name='related_test_models' 13 | ) 14 | 15 | for_inline = models.ForeignKey( 16 | 'self', 17 | models.CASCADE, 18 | null=True, 19 | blank=True, 20 | related_name='inline_test_models' 21 | ) 22 | 23 | def __str__(self): 24 | return self.name 25 | -------------------------------------------------------------------------------- /test_project/custom_select2/static/t_select2.js: -------------------------------------------------------------------------------- 1 | /* 2 | * The purpose of this script isn't to initialize the field but rather cause some side effect 3 | * so the tests can verify whether this has been run. 4 | */ 5 | 6 | // New Method 7 | document.addEventListener('dal-init-function', function () { 8 | yl.registerFunction( 'tSelect2', function ($, element) { 9 | window.__dal__tSelect2Initialized = true; 10 | }); 11 | window.__dal__tSelect2Setup = true; 12 | }); 13 | 14 | // Deprecated method 15 | window.onload = function() { 16 | (function ($) { 17 | $(document).on('autocompleteLightInitialize', '[data-autocomplete-light-function=tSelect2]', function () { 18 | window.__dal__tSelect2Initialized_depricated = true; 19 | }); 20 | window.__dal__tSelect2Setup_depricated = true; 21 | })(django.jQuery); 22 | } 23 | -------------------------------------------------------------------------------- /test_project/custom_select2/test_functional.py: -------------------------------------------------------------------------------- 1 | from dal.test import case 2 | 3 | from dal_select2.test import Select2Story 4 | 5 | from .models import TModel 6 | 7 | 8 | class AdminForeignKeyTestCase(Select2Story, case.AdminMixin, case.OptionMixin, 9 | case.AutocompleteTestCase): 10 | 11 | field_name = 'test' 12 | inline_related_name = 'inline_test_models' 13 | model = TModel 14 | 15 | def setUp(self): 16 | super(AdminForeignKeyTestCase, self).setUp() 17 | self.get(url=self.get_modeladmin_url('add')) 18 | self.fill_name() 19 | -------------------------------------------------------------------------------- /test_project/custom_select2/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | from .models import TModel 6 | 7 | 8 | urlpatterns = [ 9 | url( 10 | 'test-autocomplete/$', 11 | autocomplete.Select2QuerySetView.as_view(model=TModel), 12 | name='select2_fk', 13 | ), 14 | ] 15 | -------------------------------------------------------------------------------- /test_project/custom_select2/widgets.py: -------------------------------------------------------------------------------- 1 | from dal.autocomplete import ModelSelect2 2 | 3 | from django import forms 4 | 5 | 6 | class TModelSelect2(ModelSelect2): 7 | autocomplete_function = 'tSelect2' 8 | 9 | @property 10 | def media(self): 11 | base_media = super(TModelSelect2, self).media 12 | custom_media = forms.Media(js=('t_select2.js',)) 13 | return base_media + custom_media 14 | -------------------------------------------------------------------------------- /test_project/forward_different_fields/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/forward_different_fields/__init__.py -------------------------------------------------------------------------------- /test_project/forward_different_fields/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/forward_different_fields/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ForwardDifferentFieldsConfig(AppConfig): 5 | name = 'forward_different_fields' 6 | -------------------------------------------------------------------------------- /test_project/forward_different_fields/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-08 15:51 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='TModel', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=200)), 19 | ], 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /test_project/forward_different_fields/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/forward_different_fields/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/forward_different_fields/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | def __str__(self): 8 | return self.name 9 | -------------------------------------------------------------------------------- /test_project/forward_different_fields/static/js_handlers.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | yl.registerForwardHandler("const42", function () { 3 | return 42; 4 | }); 5 | 6 | yl.registerForwardHandler("reverse_name", function(elem) { 7 | var field = yl.getFieldRelativeTo(elem, "name"); 8 | 9 | var name = field.val(); 10 | return name.split("").reverse().join(""); 11 | }); 12 | }); -------------------------------------------------------------------------------- /test_project/forward_different_fields/tests.py: -------------------------------------------------------------------------------- 1 | # Create your tests here. 2 | -------------------------------------------------------------------------------- /test_project/forward_different_fields/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | 6 | class ListWithForwardsView(autocomplete.Select2ListView): 7 | def get_list(self): 8 | self.forwarded.get("name") 9 | self.forwarded.get("checkbox") 10 | self.forwarded.get("select") 11 | self.forwarded.get("select_radio") 12 | self.forwarded.get("multiselect") 13 | self.forwarded.get("multiselect_checks") 14 | self.forwarded.get("multiselect_checks_poor") 15 | self.forwarded.get("const42") 16 | self.forwarded.get("reverse_name") 17 | 18 | return [str(self.forwarded)] 19 | 20 | 21 | urlpatterns = [ 22 | url( 23 | '^forward_different_fields/$', 24 | ListWithForwardsView.as_view(), 25 | name='forward_different_fields' 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /test_project/linked_data/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'linked_data.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/linked_data/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/linked_data/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import OwnedFixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'linked_data' 9 | 10 | def ready(self): 11 | post_migrate.connect(OwnedFixtures(), sender=self) 12 | -------------------------------------------------------------------------------- /test_project/linked_data/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django import forms 4 | 5 | from .models import TModel 6 | 7 | 8 | class TForm(forms.ModelForm): 9 | def clean_test(self): 10 | owner = self.cleaned_data.get('owner', None) 11 | value = self.cleaned_data.get('test', None) 12 | 13 | if value and owner and value.owner != owner: 14 | raise forms.ValidationError('Wrong owner for test') 15 | 16 | return value 17 | 18 | class Meta: 19 | model = TModel 20 | fields = ('name', 'owner', 'test') 21 | widgets = { 22 | 'test': autocomplete.ModelSelect2(url='linked_data', 23 | forward=('owner',)) 24 | } 25 | 26 | class Media: 27 | js = ( 28 | 'linked_data.js', 29 | ) 30 | -------------------------------------------------------------------------------- /test_project/linked_data/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/linked_data/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/linked_data/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | test = models.ForeignKey( 8 | 'self', 9 | models.CASCADE, 10 | null=True, 11 | blank=True, 12 | related_name='related_test_models' 13 | ) 14 | 15 | owner = models.ForeignKey( 16 | 'auth.user', 17 | models.CASCADE, 18 | null=True, 19 | blank=True, 20 | related_name='owned_linked_models', 21 | ) 22 | 23 | for_inline = models.ForeignKey( 24 | 'self', 25 | models.CASCADE, 26 | null=True, 27 | blank=True, 28 | related_name='inline_test_models' 29 | ) 30 | 31 | def __str__(self): 32 | return self.name 33 | -------------------------------------------------------------------------------- /test_project/linked_data/static/linked_data.js: -------------------------------------------------------------------------------- 1 | $ = django.jQuery 2 | $(document).ready(function() { 3 | $(':input[name$=owner]').on('change', function() { 4 | var prefix = $(this).getFormPrefix(); 5 | $(':input[name=' + prefix + 'test]').val(null).trigger('change'); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /test_project/linked_data/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | from .models import TModel 6 | 7 | 8 | class LinkedDataView(autocomplete.Select2QuerySetView): 9 | def get_queryset(self): 10 | qs = super(LinkedDataView, self).get_queryset() 11 | owner = self.forwarded.get('owner', None) 12 | 13 | if owner: 14 | qs = qs.filter(owner_id=owner) 15 | 16 | return qs 17 | 18 | 19 | urlpatterns = [ 20 | url( 21 | '^linked_data/$', 22 | LinkedDataView.as_view(model=TModel), 23 | name='linked_data' 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /test_project/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /test_project/rename_forward/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'rename_forward.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/rename_forward/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/rename_forward/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class TestApp(AppConfig): 5 | name = 'rename_forward' 6 | -------------------------------------------------------------------------------- /test_project/rename_forward/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete, forward 2 | 3 | from django import forms 4 | 5 | from .models import TModel 6 | 7 | 8 | class TForm(forms.ModelForm): 9 | 10 | class Meta: 11 | model = TModel 12 | fields = ('name', 'owner', 'test') 13 | widgets = { 14 | 'test': autocomplete.ModelSelect2( 15 | url='linked_data_rf', 16 | forward=(forward.Field(src="owner", dst="possessor"), 17 | forward.Const(val=42, dst="secret")) 18 | ) 19 | } 20 | 21 | class Media: 22 | js = ( 23 | 'linked_data.js', 24 | ) 25 | -------------------------------------------------------------------------------- /test_project/rename_forward/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/rename_forward/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/rename_forward/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | test = models.ForeignKey( 8 | 'self', 9 | models.CASCADE, 10 | null=True, 11 | blank=True, 12 | related_name='related_test_models_rf' 13 | ) 14 | 15 | owner = models.ForeignKey( 16 | 'auth.user', 17 | models.CASCADE, 18 | null=True, 19 | blank=True, 20 | related_name='owned_linked_models_rf', 21 | ) 22 | 23 | for_inline = models.ForeignKey( 24 | 'self', 25 | models.CASCADE, 26 | null=True, 27 | blank=True, 28 | related_name='inline_test_models_rf' 29 | ) 30 | 31 | def __str__(self): 32 | return self.name 33 | -------------------------------------------------------------------------------- /test_project/rename_forward/static/linked_data.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $(':input[name$=owner]').on('change', function() { 3 | var prefix = $(this).getFormPrefix(); 4 | $(':input[name=' + prefix + 'test]').val(null).trigger('change'); 5 | }); 6 | }); 7 | -------------------------------------------------------------------------------- /test_project/rename_forward/test_functional.py: -------------------------------------------------------------------------------- 1 | import linked_data.test_functional 2 | 3 | from .models import TModel 4 | 5 | 6 | class RenameForwardAdminLinkedDataTestTest( 7 | linked_data.test_functional.AdminLinkedDataTest): 8 | """Reusing functional test scenarios from linked_data app.""" 9 | 10 | model = TModel 11 | inline_related_name = 'inline_test_models_rf' 12 | -------------------------------------------------------------------------------- /test_project/rename_forward/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | from .models import TModel 6 | 7 | 8 | class LinkedDataView(autocomplete.Select2QuerySetView): 9 | def get_queryset(self): 10 | qs = super(LinkedDataView, self).get_queryset() 11 | 12 | possessor = self.forwarded.get('possessor', None) 13 | secret = self.forwarded.get('secret', None) 14 | 15 | if secret != 42: 16 | return qs.none() 17 | 18 | if possessor: 19 | return qs.filter(owner_id=possessor) 20 | 21 | return qs 22 | 23 | 24 | urlpatterns = [ 25 | url( 26 | '^linked_data/$', 27 | LinkedDataView.as_view(model=TModel), 28 | name='linked_data_rf' 29 | ), 30 | ] 31 | -------------------------------------------------------------------------------- /test_project/requirements.txt: -------------------------------------------------------------------------------- 1 | coverage 2 | django-extensions 3 | django-generic-m2m 4 | django-gm2m 5 | django-querysetsequence 6 | django-nested-admin 7 | django-taggit 8 | django-tagging 9 | mock 10 | selenium 11 | pytest 12 | splinter 13 | pytest-django 14 | pytest-cov 15 | pytest-splinter 16 | tenacity 17 | whitenoise 18 | django-debug-toolbar 19 | sqlparse>=0.4.2 # not directly required, pinned by Snyk to avoid a vulnerability 20 | djhacker 21 | setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability 22 | -------------------------------------------------------------------------------- /test_project/secure_data/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'secure_data.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/secure_data/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class SecureFormMixin(object): 8 | def get_form(self, request, obj=None, **kwargs): 9 | form = super(SecureFormMixin, self).get_form( 10 | request, obj=obj, **kwargs) 11 | 12 | # Create a copy of the class so that we can hack the field definition 13 | # safely 14 | secure_form = type('SecuredAdminForm', (form,), {}) 15 | 16 | # Let's secure on the validation side now 17 | secure_form.base_fields['test'].queryset = TModel.objects.filter( 18 | owner=request.user) 19 | 20 | return secure_form 21 | 22 | 23 | class TestInline(SecureFormMixin, admin.TabularInline): 24 | fk_name = 'for_inline' 25 | model = TModel 26 | form = TForm 27 | 28 | 29 | class TestAdmin(SecureFormMixin, admin.ModelAdmin): 30 | inlines = [TestInline] 31 | form = TForm 32 | admin.site.register(TModel, TestAdmin) 33 | -------------------------------------------------------------------------------- /test_project/secure_data/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import OwnedFixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'secure_data' 9 | 10 | def ready(self): 11 | post_migrate.connect(OwnedFixtures(), sender=self) 12 | -------------------------------------------------------------------------------- /test_project/secure_data/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django import forms 4 | 5 | from .models import TModel 6 | 7 | 8 | class TForm(forms.ModelForm): 9 | class Meta: 10 | model = TModel 11 | fields = ('name', 'test') 12 | widgets = { 13 | 'test': autocomplete.ModelSelect2(url='secure_data') 14 | } 15 | -------------------------------------------------------------------------------- /test_project/secure_data/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/secure_data/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/secure_data/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | test = models.ForeignKey( 8 | 'self', 9 | models.CASCADE, 10 | null=True, 11 | blank=True, 12 | related_name='related_test_models' 13 | ) 14 | 15 | owner = models.ForeignKey( 16 | 'auth.user', 17 | models.CASCADE, 18 | null=True, 19 | blank=True, 20 | related_name='owned_models', 21 | ) 22 | 23 | for_inline = models.ForeignKey( 24 | 'self', 25 | models.CASCADE, 26 | null=True, 27 | blank=True, 28 | related_name='inline_test_models' 29 | ) 30 | 31 | def __str__(self): 32 | return self.name 33 | -------------------------------------------------------------------------------- /test_project/secure_data/test_functional.py: -------------------------------------------------------------------------------- 1 | from dal.test import case, stories 2 | from dal.test.utils import OwnedFixtures 3 | 4 | from dal_select2.test import Select2Story 5 | 6 | from .models import TModel 7 | 8 | 9 | class AdminLinkedDataTest(Select2Story, case.AdminMixin, case.OptionMixin, 10 | case.AutocompleteTestCase): 11 | field_name = 'test' 12 | inline_related_name = 'inline_test_models' 13 | model = TModel 14 | 15 | def setUp(self): 16 | super(AdminLinkedDataTest, self).setUp() 17 | 18 | if not getattr(self, 'fixtures', None): 19 | self.fixtures = OwnedFixtures() 20 | self.fixtures.install_fixtures(self.model) 21 | 22 | self.get(url=self.get_modeladmin_url('add')) 23 | 24 | def test_filtered_options(self): 25 | story = stories.SelectOption(self) 26 | story.toggle_autocomplete() 27 | 28 | story.assert_suggestion_labels_are( 29 | self.model.objects.filter( 30 | owner=self.fixtures.test 31 | ).values_list('name', flat=True) 32 | ) 33 | -------------------------------------------------------------------------------- /test_project/secure_data/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | from .models import TModel 6 | 7 | 8 | class SecureDataView(autocomplete.Select2QuerySetView): 9 | def get_queryset(self): 10 | return TModel.objects.filter(owner=self.request.user) 11 | 12 | 13 | urlpatterns = [ 14 | url( 15 | '^secure-data/$', 16 | SecureDataView.as_view(), 17 | name='secure_data', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /test_project/secure_data/views.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/secure_data/views.py -------------------------------------------------------------------------------- /test_project/select2_djhacker_formfield/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'select2_djhacker_formfield.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/select2_djhacker_formfield/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import TModel 4 | 5 | 6 | class TestInline(admin.TabularInline): 7 | model = TModel 8 | fk_name = 'for_inline' 9 | 10 | 11 | class TestAdmin(admin.ModelAdmin): 12 | inlines = [TestInline] 13 | admin.site.register(TModel, TestAdmin) 14 | -------------------------------------------------------------------------------- /test_project/select2_djhacker_formfield/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import fixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'select2_djhacker_formfield' 9 | 10 | def ready(self): 11 | post_migrate.connect(fixtures, sender=self) 12 | -------------------------------------------------------------------------------- /test_project/select2_djhacker_formfield/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2021-11-25 09:40 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='TModel', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('name', models.CharField(max_length=200)), 20 | ('for_inline', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inline_test_models', to='select2_djhacker_formfield.tmodel')), 21 | ('test', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='related_test_models', to='select2_djhacker_formfield.tmodel')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /test_project/select2_djhacker_formfield/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_djhacker_formfield/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/select2_djhacker_formfield/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | test = models.ForeignKey( 8 | 'self', 9 | models.CASCADE, 10 | null=True, 11 | blank=True, 12 | related_name='related_test_models' 13 | ) 14 | 15 | for_inline = models.ForeignKey( 16 | 'self', 17 | models.CASCADE, 18 | null=True, 19 | blank=True, 20 | related_name='inline_test_models' 21 | ) 22 | 23 | def __str__(self): 24 | return self.name 25 | -------------------------------------------------------------------------------- /test_project/select2_djhacker_formfield/test_functional.py: -------------------------------------------------------------------------------- 1 | from select2_foreign_key import test_functional 2 | 3 | from .models import TModel 4 | 5 | 6 | class AdminForeignKeyTestCase(test_functional.AdminForeignKeyTestCase): 7 | model = TModel 8 | -------------------------------------------------------------------------------- /test_project/select2_djhacker_formfield/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import path 4 | 5 | from .models import TModel 6 | 7 | 8 | urlpatterns = [ 9 | path( 10 | 'test-autocomplete/', 11 | autocomplete.Select2QuerySetView.as_view(model=TModel), 12 | name='select2_djhacker_formfield', 13 | ), 14 | ] 15 | 16 | 17 | import djhacker 18 | from django import forms 19 | djhacker.formfield( 20 | TModel.test, 21 | forms.ModelChoiceField, 22 | widget=autocomplete.ModelSelect2(url='select2_djhacker_formfield') 23 | ) 24 | -------------------------------------------------------------------------------- /test_project/select2_foreign_key/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'select2_foreign_key.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/select2_foreign_key/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_foreign_key/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import fixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'select2_foreign_key' 9 | 10 | def ready(self): 11 | post_migrate.connect(fixtures, sender=self) 12 | -------------------------------------------------------------------------------- /test_project/select2_foreign_key/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django import forms 4 | 5 | from .models import TModel 6 | 7 | 8 | class TForm(forms.ModelForm): 9 | class Meta: 10 | model = TModel 11 | fields = ('name', 'test') 12 | widgets = { 13 | 'test': autocomplete.ModelSelect2(url='select2_fk') 14 | } 15 | -------------------------------------------------------------------------------- /test_project/select2_foreign_key/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-08 15:51 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='TModel', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('name', models.CharField(max_length=200)), 20 | ('for_inline', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inline_test_models', to='select2_foreign_key.TModel')), 21 | ('test', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='related_test_models', to='select2_foreign_key.TModel')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /test_project/select2_foreign_key/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_foreign_key/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/select2_foreign_key/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | test = models.ForeignKey( 8 | 'self', 9 | models.CASCADE, 10 | null=True, 11 | blank=True, 12 | related_name='related_test_models' 13 | ) 14 | 15 | for_inline = models.ForeignKey( 16 | 'self', 17 | models.CASCADE, 18 | null=True, 19 | blank=True, 20 | related_name='inline_test_models' 21 | ) 22 | 23 | def __str__(self): 24 | return self.name 25 | -------------------------------------------------------------------------------- /test_project/select2_foreign_key/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | from .models import TModel 6 | 7 | 8 | urlpatterns = [ 9 | url( 10 | 'test-autocomplete/$', 11 | autocomplete.Select2QuerySetView.as_view(model=TModel), 12 | name='select2_fk', 13 | ), 14 | ] 15 | -------------------------------------------------------------------------------- /test_project/select2_generic_foreign_key/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'select2_generic_foreign_key.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/select2_generic_foreign_key/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_generic_foreign_key/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import Fixtures, fixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'select2_generic_foreign_key' 9 | 10 | def ready(self): 11 | post_migrate.connect(fixtures, sender=self) 12 | post_migrate.connect(Fixtures('auth.group'), sender=self) 13 | -------------------------------------------------------------------------------- /test_project/select2_generic_foreign_key/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView 4 | from dal_select2_queryset_sequence.widgets import QuerySetSequenceSelect2 5 | 6 | from django.contrib.auth.models import Group 7 | 8 | from .models import TModel 9 | 10 | 11 | class TForm(autocomplete.FutureModelForm): 12 | test = autocomplete.Select2GenericForeignKeyModelField( 13 | model_choice=[ 14 | (Group, 'name'), 15 | (TModel, 'name', [('name', 'name')]) 16 | ], # Model with values to filter 17 | 18 | required=False, 19 | field_id='test', 20 | ) 21 | 22 | test2 = autocomplete.GenericForeignKeyModelField( 23 | model_choice=[(Group,), (TModel,)], 24 | required=False, 25 | widget=QuerySetSequenceSelect2, 26 | view=Select2QuerySetSequenceView, 27 | ) 28 | 29 | class Meta: 30 | model = TModel 31 | fields = ('name',) 32 | -------------------------------------------------------------------------------- /test_project/select2_generic_foreign_key/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_generic_foreign_key/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/select2_generic_foreign_key/test_views.py: -------------------------------------------------------------------------------- 1 | from django.urls import reverse 2 | import pytest 3 | 4 | from .forms import TForm 5 | 6 | 7 | @pytest.mark.django_db 8 | def test_search(client): 9 | url = reverse(TForm.declared_fields['test2'].as_url(TForm).name) 10 | client.get(url + '?q=test+1').json() 11 | -------------------------------------------------------------------------------- /test_project/select2_generic_foreign_key/urls.py: -------------------------------------------------------------------------------- 1 | # from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | # from django.contrib.auth.models import Group 5 | from django.views import generic 6 | 7 | from .forms import TForm 8 | from .models import TModel 9 | 10 | 11 | urlpatterns = [ 12 | url( 13 | r'test/(?P\d+)/$', 14 | generic.UpdateView.as_view( 15 | model=TModel, 16 | form_class=TForm, 17 | ) 18 | ), 19 | ] 20 | urlpatterns.extend(TForm.as_urls()) 21 | -------------------------------------------------------------------------------- /test_project/select2_generic_foreign_key/views.py: -------------------------------------------------------------------------------- 1 | from django.views import generic 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestView(generic.UpdateView): 8 | model = TModel 9 | form_class = TForm 10 | template_name = 'form.html' 11 | 12 | def get_success_url(self): 13 | return self.request.path 14 | -------------------------------------------------------------------------------- /test_project/select2_generic_m2m/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'select2_generic_m2m.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/select2_generic_m2m/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_generic_m2m/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import Fixtures, fixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'select2_generic_m2m' 9 | 10 | def ready(self): 11 | post_migrate.connect(fixtures, sender=self) 12 | post_migrate.connect(Fixtures('auth.group'), sender=self) 13 | -------------------------------------------------------------------------------- /test_project/select2_generic_m2m/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.contrib.auth.models import Group 4 | 5 | from .models import TModel 6 | 7 | 8 | class TForm(autocomplete.FutureModelForm): 9 | test = autocomplete.GenericM2MQuerySetSequenceField( 10 | queryset=autocomplete.QuerySetSequence( 11 | Group.objects.all(), 12 | TModel.objects.all(), 13 | ), 14 | required=False, 15 | widget=autocomplete.QuerySetSequenceSelect2Multiple( 16 | 'select2_generic_m2m'), 17 | ) 18 | 19 | class Meta: 20 | model = TModel 21 | fields = ('name',) 22 | -------------------------------------------------------------------------------- /test_project/select2_generic_m2m/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | from genericm2m.models import RelatedObjectsDescriptor 4 | 5 | 6 | class TModel(models.Model): 7 | name = models.CharField(max_length=200) 8 | 9 | test = RelatedObjectsDescriptor() 10 | 11 | for_inline = models.ForeignKey( 12 | 'self', 13 | models.CASCADE, 14 | null=True, 15 | blank=True, 16 | related_name='inline_test_models' 17 | ) 18 | 19 | def __str__(self): 20 | return self.name 21 | -------------------------------------------------------------------------------- /test_project/select2_generic_m2m/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | from django.contrib.auth.models import Group 5 | from django.views import generic 6 | 7 | from .forms import TForm 8 | from .models import TModel 9 | 10 | 11 | urlpatterns = [ 12 | url( 13 | '^select2-generic-m2m/$', 14 | autocomplete.Select2QuerySetSequenceView.as_view( 15 | queryset=autocomplete.QuerySetSequence( 16 | Group.objects.all(), 17 | TModel.objects.all(), 18 | ) 19 | ), 20 | name='select2_generic_m2m', 21 | ), 22 | url( 23 | 'test/(?P\d+)/$', 24 | generic.UpdateView.as_view( 25 | model=TModel, 26 | form_class=TForm, 27 | ) 28 | ), 29 | ] 30 | -------------------------------------------------------------------------------- /test_project/select2_generic_m2m/views.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_generic_m2m/views.py -------------------------------------------------------------------------------- /test_project/select2_gm2m/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'select2_gm2m.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/select2_gm2m/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_gm2m/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import Fixtures, fixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'select2_gm2m' 9 | 10 | def ready(self): 11 | post_migrate.connect(fixtures, sender=self) 12 | post_migrate.connect(Fixtures('auth.group'), sender=self) 13 | -------------------------------------------------------------------------------- /test_project/select2_gm2m/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.contrib.auth.models import Group 4 | 5 | from .models import TModel 6 | 7 | 8 | class TForm(autocomplete.FutureModelForm): 9 | test = autocomplete.GM2MQuerySetSequenceField( 10 | queryset=autocomplete.QuerySetSequence( 11 | Group.objects.all(), 12 | TModel.objects.all(), 13 | ), 14 | required=False, 15 | widget=autocomplete.QuerySetSequenceSelect2Multiple( 16 | 'select2_gm2m'), 17 | ) 18 | 19 | class Meta: 20 | model = TModel 21 | fields = ('name',) 22 | -------------------------------------------------------------------------------- /test_project/select2_gm2m/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | from gm2m import GM2MField 4 | 5 | 6 | class TModel(models.Model): 7 | name = models.CharField(max_length=200) 8 | 9 | test = GM2MField() 10 | 11 | for_inline = models.ForeignKey( 12 | 'self', 13 | models.CASCADE, 14 | null=True, 15 | blank=True, 16 | related_name='inline_test_models' 17 | ) 18 | 19 | def __str__(self): 20 | return self.name 21 | -------------------------------------------------------------------------------- /test_project/select2_gm2m/test_forms.py: -------------------------------------------------------------------------------- 1 | from django import test 2 | 3 | from select2_generic_m2m.test_forms import GenericSelect2TestMixin 4 | 5 | from .forms import TForm 6 | from .models import TModel 7 | 8 | 9 | class GM2MFormTest(GenericSelect2TestMixin, test.TestCase): 10 | model = TModel 11 | form = TForm 12 | url_name = 'select2_gm2m' 13 | 14 | def assert_relation_equals(self, expected, result): 15 | self.assertEqual(len(expected), len(result)) 16 | 17 | for o in result: 18 | self.assertIn(getattr(o, 'gm2m_tgt', o), expected) 19 | -------------------------------------------------------------------------------- /test_project/select2_gm2m/test_functional.py: -------------------------------------------------------------------------------- 1 | from dal.test import case 2 | 3 | from dal_select2.test import Select2Story 4 | 5 | from select2_generic_m2m.test_functional import AdminGenericM2MBase 6 | 7 | from .models import TModel 8 | 9 | 10 | class AdminGM2MTestCase(AdminGenericM2MBase, 11 | Select2Story, 12 | case.AdminMixin, 13 | case.ContentTypeOptionMixin, 14 | case.AutocompleteTestCase): 15 | model = TModel 16 | -------------------------------------------------------------------------------- /test_project/select2_gm2m/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | from django.contrib.auth.models import Group 5 | from django.views import generic 6 | 7 | from .forms import TForm 8 | from .models import TModel 9 | 10 | 11 | urlpatterns = [ 12 | url( 13 | '^select2_gm2m/$', 14 | autocomplete.Select2QuerySetSequenceView.as_view( 15 | queryset=autocomplete.QuerySetSequence( 16 | Group.objects.all(), 17 | TModel.objects.all(), 18 | ) 19 | ), 20 | name='select2_gm2m', 21 | ), 22 | url( 23 | 'test/(?P\d+)/$', 24 | generic.UpdateView.as_view( 25 | model=TModel, 26 | form_class=TForm, 27 | ) 28 | ), 29 | ] 30 | -------------------------------------------------------------------------------- /test_project/select2_gm2m/views.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_gm2m/views.py -------------------------------------------------------------------------------- /test_project/select2_list/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_list/__init__.py -------------------------------------------------------------------------------- /test_project/select2_list/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_list/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django import forms 4 | 5 | from .models import TModel 6 | 7 | 8 | def get_choice_list(): 9 | return [model.test for model in TModel.objects.all()] 10 | 11 | 12 | def get_choice_list_with_id(): 13 | return [[str(model.id), model.test] for model in TModel.objects.all()] 14 | 15 | 16 | class TForm(forms.ModelForm): 17 | test = autocomplete.Select2ListCreateChoiceField( 18 | choice_list=get_choice_list, 19 | required=False, 20 | widget=autocomplete.ListSelect2(url='select2_list') 21 | ) 22 | -------------------------------------------------------------------------------- /test_project/select2_list/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-08 15:51 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='TModel', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('name', models.CharField(max_length=200)), 20 | ('test', models.CharField(blank=True, max_length=100, null=True)), 21 | ('for_inline', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inline_test_models', to='select2_list.TModel')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /test_project/select2_list/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_list/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/select2_list/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | test = models.CharField( 8 | max_length=100, 9 | null=True, 10 | blank=True 11 | ) 12 | 13 | for_inline = models.ForeignKey( 14 | 'self', 15 | models.CASCADE, 16 | null=True, 17 | blank=True, 18 | related_name='inline_test_models' 19 | ) 20 | 21 | def __str__(self): 22 | return self.name 23 | -------------------------------------------------------------------------------- /test_project/select2_list/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import re_path as url 2 | 3 | from .views import Select2ListViewAutocomplete, Select2ProvidedValueListViewAutocomplete 4 | 5 | 6 | urlpatterns = [ 7 | url( 8 | 'test-autocomplete/$', 9 | Select2ListViewAutocomplete.as_view(), 10 | name='select2_list', 11 | ), 12 | url( 13 | 'test-provided-value-autocomplete/$', 14 | Select2ProvidedValueListViewAutocomplete.as_view(), 15 | name='select2_povided_value_list', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /test_project/select2_list/views.py: -------------------------------------------------------------------------------- 1 | from dal.autocomplete import Select2ListView 2 | 3 | from .forms import get_choice_list, get_choice_list_with_id 4 | 5 | 6 | class Select2ListViewAutocomplete(Select2ListView): 7 | def create(self, text): 8 | return text 9 | 10 | def get_list(self): 11 | return get_choice_list() 12 | 13 | 14 | class Select2ProvidedValueListViewAutocomplete(Select2ListView): 15 | def create(self, text): 16 | return text 17 | 18 | def get_list(self): 19 | return get_choice_list_with_id() 20 | -------------------------------------------------------------------------------- /test_project/select2_many_to_many/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'select2_many_to_many.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/select2_many_to_many/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_many_to_many/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import fixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'select2_many_to_many' 9 | 10 | def ready(self): 11 | post_migrate.connect(fixtures, sender=self) 12 | -------------------------------------------------------------------------------- /test_project/select2_many_to_many/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django import forms 4 | 5 | from .models import TModel 6 | 7 | 8 | class TForm(forms.ModelForm): 9 | class Meta: 10 | model = TModel 11 | fields = ('name', 'test') 12 | widgets = { 13 | 'test': autocomplete.ModelSelect2Multiple( 14 | 'select2_many_to_many_autocomplete' 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /test_project/select2_many_to_many/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-08 15:51 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='TModel', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('name', models.CharField(max_length=200)), 20 | ('for_inline', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inline_test_models', to='select2_many_to_many.TModel')), 21 | ('test', models.ManyToManyField(blank=True, related_name='_tmodel_test_+', to='select2_many_to_many.TModel')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /test_project/select2_many_to_many/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_many_to_many/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/select2_many_to_many/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class TModel(models.Model): 5 | name = models.CharField(max_length=200) 6 | 7 | test = models.ManyToManyField( 8 | 'self', 9 | blank=True, 10 | related_name='related_test_models' 11 | ) 12 | 13 | for_inline = models.ForeignKey( 14 | 'self', 15 | models.CASCADE, 16 | null=True, 17 | blank=True, 18 | related_name='inline_test_models' 19 | ) 20 | 21 | def __str__(self): 22 | return self.name 23 | -------------------------------------------------------------------------------- /test_project/select2_many_to_many/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | from django.views import generic 5 | 6 | from .forms import TForm 7 | from .models import TModel 8 | 9 | 10 | urlpatterns = [ 11 | url( 12 | 'test-autocomplete/$', 13 | autocomplete.Select2QuerySetView.as_view( 14 | model=TModel, 15 | create_field='name', 16 | ), 17 | name='select2_many_to_many_autocomplete', 18 | ), 19 | url( 20 | r'test/(?P\d+)/$', 21 | generic.UpdateView.as_view( 22 | model=TModel, 23 | form_class=TForm, 24 | ) 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /test_project/select2_nestedadmin/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'select2_nestedadmin.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/select2_nestedadmin/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | import nested_admin 4 | 5 | from .forms import TFormThree 6 | from .models import TModelOne, TModelThree, TModelTwo 7 | 8 | 9 | class TModelThreeInline(nested_admin.NestedStackedInline): 10 | model = TModelThree 11 | form = TFormThree 12 | extra = 1 13 | 14 | 15 | class TModelTwoInline(nested_admin.NestedStackedInline): 16 | model = TModelTwo 17 | inlines = [TModelThreeInline] 18 | extra = 1 19 | 20 | 21 | class TModelOneAdmin(nested_admin.NestedModelAdmin): 22 | model = TModelOne 23 | inlines = [TModelTwoInline] 24 | 25 | 26 | admin.site.register(TModelOne, TModelOneAdmin) 27 | -------------------------------------------------------------------------------- /test_project/select2_nestedadmin/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class TestApp(AppConfig): 5 | name = 'select2_nestedadmin' 6 | -------------------------------------------------------------------------------- /test_project/select2_nestedadmin/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django import forms 4 | 5 | from .models import TModelThree 6 | 7 | 8 | class TFormThree(forms.ModelForm): 9 | class Meta: 10 | model = TModelThree 11 | fields = ('name', 'test') 12 | widgets = { 13 | 'test': autocomplete.ModelSelect2( 14 | url='nested_linked_data', 15 | forward=('level_one', 'level_two'), 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /test_project/select2_nestedadmin/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_nestedadmin/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/select2_nestedadmin/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | from .models import TModelThree 6 | 7 | 8 | class NestedAdminError(Exception): 9 | pass 10 | 11 | 12 | class LinkedDataView(autocomplete.Select2QuerySetView): 13 | def get_queryset(self): 14 | # We don't really care about filtering in this test app, but only that 15 | # the values are forwarded properly. 16 | level_one = self.forwarded.get('level_one', None) 17 | level_two = self.forwarded.get('level_two', None) 18 | 19 | if not level_one or not level_two: 20 | raise NestedAdminError( 21 | 'Linked fields are not forwarded properly for nested admin') 22 | 23 | return super(LinkedDataView, self).get_queryset() 24 | 25 | 26 | urlpatterns = [ 27 | url( 28 | '^linked_data/$', 29 | LinkedDataView.as_view(model=TModelThree), 30 | name='nested_linked_data' 31 | ), 32 | ] 33 | -------------------------------------------------------------------------------- /test_project/select2_one_to_one/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = 'select2_one_to_one.apps.TestApp' 2 | -------------------------------------------------------------------------------- /test_project/select2_one_to_one/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_one_to_one/apps.py: -------------------------------------------------------------------------------- 1 | from dal.test.utils import fixtures 2 | 3 | from django.apps import AppConfig 4 | from django.db.models.signals import post_migrate 5 | 6 | 7 | class TestApp(AppConfig): 8 | name = 'select2_one_to_one' 9 | 10 | def ready(self): 11 | post_migrate.connect(fixtures, sender=self) 12 | -------------------------------------------------------------------------------- /test_project/select2_one_to_one/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from .models import TModel 4 | 5 | 6 | class TForm(autocomplete.FutureModelForm): 7 | class Meta: 8 | model = TModel 9 | fields = ('name', 'test') 10 | widgets = { 11 | 'test': autocomplete.ModelSelect2( 12 | 'select2_one_to_one_autocomplete' 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /test_project/select2_one_to_one/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-08 15:51 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='TModel', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('name', models.CharField(max_length=200)), 20 | ('for_inline', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inline_test_models', to='select2_one_to_one.TModel')), 21 | ('test', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='related_test_models', to='select2_one_to_one.TModel')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /test_project/select2_one_to_one/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_one_to_one/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/select2_one_to_one/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.core.validators import validate_slug 3 | 4 | 5 | class TModel(models.Model): 6 | name = models.CharField( 7 | max_length=200, 8 | validators=[validate_slug] 9 | ) 10 | 11 | test = models.OneToOneField( 12 | 'self', 13 | models.CASCADE, 14 | null=True, 15 | blank=True, 16 | related_name='related_test_models' 17 | ) 18 | 19 | for_inline = models.ForeignKey( 20 | 'self', 21 | models.CASCADE, 22 | null=True, 23 | blank=True, 24 | related_name='inline_test_models' 25 | ) 26 | 27 | def __str__(self): 28 | return self.name 29 | -------------------------------------------------------------------------------- /test_project/select2_one_to_one/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | from django.views import generic 5 | 6 | from .forms import TForm 7 | from .models import TModel 8 | 9 | 10 | urlpatterns = [ 11 | url( 12 | 'test-autocomplete/$', 13 | autocomplete.Select2QuerySetView.as_view( 14 | model=TModel, 15 | create_field='name', 16 | validate_create=True, 17 | ), 18 | name='select2_one_to_one_autocomplete', 19 | ), 20 | url( 21 | r'test/(?P\d+)/$', 22 | generic.UpdateView.as_view( 23 | model=TModel, 24 | form_class=TForm, 25 | ) 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /test_project/select2_outside_admin/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_outside_admin/__init__.py -------------------------------------------------------------------------------- /test_project/select2_outside_admin/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import re_path as url 2 | 3 | from .views import UpdateView 4 | 5 | 6 | urlpatterns = [ 7 | url( 8 | r'^$', 9 | UpdateView.as_view(), 10 | name='select2_outside_admin', 11 | ), 12 | ] 13 | -------------------------------------------------------------------------------- /test_project/select2_tagging/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_tagging/__init__.py -------------------------------------------------------------------------------- /test_project/select2_tagging/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_tagging/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django import forms 4 | 5 | from tagging.forms import TagField 6 | 7 | from .models import TModel 8 | 9 | 10 | class TForm(forms.ModelForm): 11 | test = TagField( 12 | widget=autocomplete.TaggingSelect2('select2_tagging'), 13 | required=False, 14 | ) 15 | 16 | class Meta: 17 | model = TModel 18 | exclude = ['for_inline'] 19 | -------------------------------------------------------------------------------- /test_project/select2_tagging/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | from tagging.fields import TagField 4 | 5 | 6 | class TModel(models.Model): 7 | name = models.CharField(max_length=200) 8 | 9 | test = TagField() 10 | 11 | for_inline = models.ForeignKey( 12 | 'self', 13 | models.CASCADE, 14 | null=True, 15 | blank=True, 16 | related_name='inline_test_models' 17 | ) 18 | 19 | def __str__(self): 20 | return self.name 21 | -------------------------------------------------------------------------------- /test_project/select2_tagging/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | from tagging.models import Tag 6 | 7 | 8 | urlpatterns = [ 9 | url( 10 | 'test-autocomplete/$', 11 | autocomplete.Select2QuerySetView.as_view( 12 | queryset=Tag.objects.all(), 13 | ), 14 | name='select2_tagging', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /test_project/select2_taggit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_taggit/__init__.py -------------------------------------------------------------------------------- /test_project/select2_taggit/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .forms import TForm 4 | from .models import TModel 5 | 6 | 7 | class TestInline(admin.TabularInline): 8 | form = TForm 9 | model = TModel 10 | fk_name = 'for_inline' 11 | 12 | 13 | class TestAdmin(admin.ModelAdmin): 14 | form = TForm 15 | inlines = [TestInline] 16 | admin.site.register(TModel, TestAdmin) 17 | -------------------------------------------------------------------------------- /test_project/select2_taggit/forms.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django import forms 4 | 5 | from .models import TModel 6 | 7 | 8 | class TForm(forms.ModelForm): 9 | class Meta: 10 | model = TModel 11 | fields = ('name', 'test') 12 | widgets = { 13 | 'test': autocomplete.TaggitSelect2('select2_taggit') 14 | } 15 | -------------------------------------------------------------------------------- /test_project/select2_taggit/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-08 15:51 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | import taggit.managers 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ('taggit', '0002_auto_20150616_2121'), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='TModel', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('name', models.CharField(max_length=200)), 22 | ('for_inline', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inline_test_models', to='select2_taggit.TModel')), 23 | ('test', taggit.managers.TaggableManager(help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), 24 | ], 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /test_project/select2_taggit/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/select2_taggit/migrations/__init__.py -------------------------------------------------------------------------------- /test_project/select2_taggit/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | from taggit.managers import TaggableManager 4 | 5 | 6 | class TModel(models.Model): 7 | name = models.CharField(max_length=200) 8 | 9 | test = TaggableManager() 10 | 11 | for_inline = models.ForeignKey( 12 | 'self', 13 | models.CASCADE, 14 | null=True, 15 | blank=True, 16 | related_name='inline_test_models' 17 | ) 18 | 19 | def __str__(self): 20 | return self.name 21 | -------------------------------------------------------------------------------- /test_project/select2_taggit/urls.py: -------------------------------------------------------------------------------- 1 | from dal import autocomplete 2 | 3 | from django.urls import re_path as url 4 | 5 | from taggit.models import Tag 6 | 7 | 8 | urlpatterns = [ 9 | url( 10 | 'test-autocomplete/$', 11 | autocomplete.Select2QuerySetView.as_view( 12 | queryset=Tag.objects.all(), 13 | ), 14 | name='select2_taggit', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /test_project/settings/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import * 2 | -------------------------------------------------------------------------------- /test_project/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yourlabs/django-autocomplete-light/d8298918b20a2edebcba7035058601fb8aace9d9/test_project/tests/__init__.py -------------------------------------------------------------------------------- /test_project/tests/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.contrib.auth.models import User 3 | 4 | admin.site.unregister(User) 5 | -------------------------------------------------------------------------------- /test_project/tests/models.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.models import User 2 | from django.db.models.signals import post_migrate 3 | 4 | 5 | def test_user(sender, *args, **kwargs): 6 | if sender.name != 'django.contrib.auth': 7 | return 8 | 9 | user, c = User.objects.get_or_create(username='test') 10 | user.is_staff = True 11 | user.is_superuser = True 12 | user.set_password('test') 13 | user.save() 14 | 15 | post_migrate.connect(test_user) 16 | -------------------------------------------------------------------------------- /test_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for project project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | import sys 12 | 13 | from django.core.wsgi import get_wsgi_application 14 | 15 | sys.path.insert( 16 | 0, 17 | os.path.abspath(os.path.join(os.path.dirname(__file__))) 18 | ) 19 | 20 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") 21 | 22 | application = get_wsgi_application() 23 | --------------------------------------------------------------------------------