├── tests └── __init__.py ├── docs ├── requirements_docs.txt ├── authors.rst ├── history.rst ├── readme.rst ├── contributing.rst ├── installation.rst ├── index.rst ├── Makefile ├── make.bat ├── usage.rst └── conf.py ├── autocomplete_all ├── _version.py ├── templates │ └── admin │ │ └── base_site.html ├── __init__.py ├── static │ └── autocomplete_all │ │ └── js │ │ └── autocomplete_all.js └── autocomplete_all.py ├── requirements.txt ├── circle.yml ├── requirements_dev.txt ├── requirements_test.txt ├── AUTHORS.rst ├── MANIFEST.in ├── setup.cfg ├── manage.py ├── .editorconfig ├── tox8.ini ├── tox6.ini ├── tox7.ini ├── tox.ini ├── LICENSE ├── Makefile ├── HISTORY.rst ├── README_.md ├── .gitignore ├── setup.py ├── CONTRIBUTING.rst └── README.rst /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/requirements_docs.txt: -------------------------------------------------------------------------------- 1 | django 2 | -------------------------------------------------------------------------------- /docs/authors.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../AUTHORS.rst 2 | -------------------------------------------------------------------------------- /docs/history.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../HISTORY.rst 2 | -------------------------------------------------------------------------------- /docs/readme.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../README.rst 2 | -------------------------------------------------------------------------------- /autocomplete_all/_version.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.6.6" 2 | -------------------------------------------------------------------------------- /docs/contributing.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../CONTRIBUTING.rst 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # Additional requirements go here 2 | 3 | -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | override: 3 | - pip install tox tox-pyenv 4 | - pyenv local 3.6.10 3.7.6 3.8.1 5 | -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | wheel>=0.30.0 2 | twine>=3.1.1 # PyPI publishing 3 | sphinx>=2.3.1 # docs for readthedocs.org 4 | check-manifest 5 | 6 | -------------------------------------------------------------------------------- /requirements_test.txt: -------------------------------------------------------------------------------- 1 | coverage==4.4.1 2 | mock>=1.0.1 3 | flake8>=2.1.0 4 | tox>=1.7.0 5 | tox-pyenv>=1.1.0 6 | codecov>=2.0.0 7 | pytest>=5.3.2 8 | 9 | # Additional test requirements go here 10 | -------------------------------------------------------------------------------- /AUTHORS.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Credits 3 | ======= 4 | 5 | Development Lead 6 | ---------------- 7 | 8 | * Mirek Zvolský 9 | 10 | Contributors 11 | ------------ 12 | 13 | None yet. Why not be the first? 14 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include AUTHORS.rst 2 | include CONTRIBUTING.rst 3 | include HISTORY.rst 4 | include LICENSE 5 | include README.rst 6 | recursive-include autocomplete_all *.html *.png *.gif *.js *.css *.jpg *.jpeg *.svg *.py 7 | 8 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [wheel] 2 | universal = 1 3 | 4 | [flake8] 5 | ignore = D203 6 | exclude = 7 | autocomplete_all/migrations, 8 | .git, 9 | .tox, 10 | docs/conf.py, 11 | build, 12 | dist 13 | max-line-length = 119 14 | -------------------------------------------------------------------------------- /autocomplete_all/templates/admin/base_site.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/base_site.html' %} 2 | {% block footer %} 3 | {{ block.super }} 4 | 9 | {% endblock footer %} 10 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import unicode_literals, absolute_import 4 | 5 | import os 6 | import sys 7 | 8 | if __name__ == "__main__": 9 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings") 10 | from django.core.management import execute_from_command_line 11 | 12 | execute_from_command_line(sys.argv) 13 | -------------------------------------------------------------------------------- /docs/installation.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Installation 3 | ============ 4 | 5 | For usage:: 6 | 7 | $ pip install django-admin-autocomplete-all 8 | 9 | For development, with virtualenvwrapper installed:: 10 | 11 | $ git clone https://github.com/pyutil/django-admin-autocomplete-all.git 12 | $ mkvirtualenv django-admin-autocomplete-all -p python3 -a django-admin-autocomplete-all/ -r requirements.txt 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.{py,rst,ini}] 12 | indent_style = space 13 | indent_size = 4 14 | 15 | [*.{html,css,scss,json,yml}] 16 | indent_style = space 17 | indent_size = 2 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | 22 | [Makefile] 23 | indent_style = tab 24 | -------------------------------------------------------------------------------- /tox8.ini: -------------------------------------------------------------------------------- 1 | # tox -c tox8.ini 2 | 3 | [tox] 4 | requires = django 5 | envlist = 6 | py38-django-30 7 | py38-django-22 8 | 9 | [testenv] 10 | setenv = 11 | PYTHONPATH = {toxinidir}:{toxinidir}/autocomplete_all 12 | commands = pytest 13 | deps = 14 | django-111: Django>=1.11,<1.12 15 | django-22: Django>=2.2,<2.99 16 | django-30: Django>=3.0,<3.99 17 | -r {toxinidir}/requirements_test.txt 18 | basepython = 19 | py38: python3.8 20 | 21 | -------------------------------------------------------------------------------- /tox6.ini: -------------------------------------------------------------------------------- 1 | # tox -c tox6.ini 2 | 3 | [tox] 4 | requires = django 5 | envlist = 6 | py36-django-30 7 | py36-django-22 8 | py36-django-111 9 | 10 | [testenv] 11 | setenv = 12 | PYTHONPATH = {toxinidir}:{toxinidir}/autocomplete_all 13 | commands = pytest 14 | deps = 15 | django-111: Django>=1.11,<1.12 16 | django-22: Django>=2.2,<2.99 17 | django-30: Django>=3.0,<3.99 18 | -r {toxinidir}/requirements_test.txt 19 | basepython = 20 | py36: python3.6 21 | 22 | -------------------------------------------------------------------------------- /tox7.ini: -------------------------------------------------------------------------------- 1 | # tox -c tox7.ini 2 | 3 | [tox] 4 | requires = django 5 | envlist = 6 | py37-django-30 7 | py37-django-22 8 | py37-django-111 9 | 10 | [testenv] 11 | setenv = 12 | PYTHONPATH = {toxinidir}:{toxinidir}/autocomplete_all 13 | commands = pytest 14 | deps = 15 | django-111: Django>=1.11,<1.12 16 | django-22: Django>=2.2,<2.99 17 | django-30: Django>=3.0,<3.99 18 | -r {toxinidir}/requirements_test.txt 19 | basepython = 20 | py37: python3.7 21 | 22 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | requires = django 3 | envlist = 4 | {py36,py37,py38}-django-30 5 | {py36,py37,py38}-django-22 6 | {py36,py37}-django-111 7 | 8 | [testenv] 9 | setenv = 10 | PYTHONPATH = {toxinidir}:{toxinidir}/autocomplete_all 11 | commands = pytest 12 | deps = 13 | django-111: Django>=1.11,<1.12 14 | django-22: Django>=2.2,<2.99 15 | django-30: Django>=3.0,<3.99 16 | -r {toxinidir}/requirements_test.txt 17 | basepython = 18 | py36: python3.6 19 | py37: python3.7 20 | py38: python3.8 21 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. complexity documentation master file, created by 2 | sphinx-quickstart on Tue Jul 9 22:26:36 2013. 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-admin-autocomplete-all's documentation! 7 | ================================================================= 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | readme 15 | installation 16 | usage 17 | contributing 18 | authors 19 | history 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 pyutil 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /autocomplete_all/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | In Django admin: 3 | - Use select2 (autocomplete_fields) everywhere. HowTo? in admin.py use: `import autocomplete_all as admin` 4 | - Add ?key=.. into Referer url (makes possible distinguish which ForeignKey calls an autocomplete) HowTo? add `autocomplete_all` into `INSTALLED_APPS` 5 | - Remove danger Edit/Delete buttons near to ForeignKey. HowTo? add `autocomplete_all` into `INSTALLED_APPS` before(!) `django.contrib.admin` 6 | """ 7 | 8 | from ._version import __version__ 9 | 10 | 11 | __version_info__ = VERSION = tuple(map(lambda x: int(x), __version__.split('.'))) 12 | 13 | 14 | # make this accessible at basic level as if it would be module (and not a package) 15 | from django.contrib.admin import (AdminSite, AllValuesFieldListFilter, BooleanFieldListFilter, ChoicesFieldListFilter, DateFieldListFilter, 16 | EmptyFieldListFilter, FieldListFilter, HORIZONTAL, ListFilter, RelatedFieldListFilter, RelatedOnlyFieldListFilter, SimpleListFilter, 17 | VERTICAL, actions, apps, autodiscover, autodiscover_modules, checks, decorators, exceptions, filters, helpers, 18 | options, register, site, sites, templatetags, utils, views, widgets) 19 | # skipped: default_app_config, models (because with them it is impossible to add `autocomplete_all` into INSTALLED_APPS) 20 | # skipped ModelAdmin, StackedInline, TabularInline 21 | from .autocomplete_all import HiddenAdmin, AutocompleteAllMixin, ModelAdmin, StackedInline, TabularInline 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean-pyc clean-build docs help 2 | .DEFAULT_GOAL := help 3 | define BROWSER_PYSCRIPT 4 | import os, webbrowser, sys 5 | try: 6 | from urllib import pathname2url 7 | except: 8 | from urllib.request import pathname2url 9 | 10 | webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) 11 | endef 12 | export BROWSER_PYSCRIPT 13 | BROWSER := python -c "$$BROWSER_PYSCRIPT" 14 | 15 | help: 16 | @grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}' 17 | 18 | clean: clean-build clean-pyc 19 | 20 | clean-build: ## remove build artifacts 21 | rm -fr build/ 22 | rm -fr dist/ 23 | rm -fr *.egg-info 24 | 25 | clean-pyc: ## remove Python file artifacts 26 | find . -name '*.pyc' -exec rm -f {} + 27 | find . -name '*.pyo' -exec rm -f {} + 28 | find . -name '*~' -exec rm -f {} + 29 | 30 | lint: ## check style with flake8 31 | flake8 django_admin_autocomplete_all tests 32 | 33 | test: ## run tests quickly with the default Python 34 | python runtests.py tests 35 | 36 | test-all: ## run tests on every Python version with tox 37 | tox 38 | 39 | coverage: ## check code coverage quickly with the default Python 40 | coverage run --source django_admin_autocomplete_all runtests.py tests 41 | coverage report -m 42 | coverage html 43 | open htmlcov/index.html 44 | 45 | docs: ## generate Sphinx HTML documentation, including API docs 46 | rm -f docs/django-admin-autocomplete-all.rst 47 | rm -f docs/modules.rst 48 | sphinx-apidoc -o docs/ django_admin_autocomplete_all 49 | $(MAKE) -C docs clean 50 | $(MAKE) -C docs html 51 | $(BROWSER) docs/_build/html/index.html 52 | 53 | release: clean ## package and upload a release 54 | python setup.py sdist upload 55 | python setup.py bdist_wheel upload 56 | 57 | sdist: clean ## package 58 | python setup.py sdist 59 | ls -l dist 60 | -------------------------------------------------------------------------------- /HISTORY.rst: -------------------------------------------------------------------------------- 1 | .. :changelog: 2 | 3 | History 4 | ------- 5 | 6 | 0.6.6 (2022-02-16) 7 | ++++++++++++++++++ 8 | Solved HttpRequest.is_ajax() deprecation (Dj 3.1) - thx Darío Fragas for help and contribution 9 | 10 | 0.6.3 (2021-03-10) 11 | ++++++++++++++++++ 12 | INCOMPATIBLE: MediaMixin renamed to AutocompleteAllMixin (please rename if you have this class in your code) 13 | 14 | 0.6.0 (2021-03-09) 15 | INCOMPATIBLE: autocomplete_params.js renamend to autocomplete_all.js (please rename if you have this in your code) 16 | autocomplete_all.js is now always attached in MediaMixin [later: AutocompleteAllMixin] (for ModelAdmin and both Inlines) 17 | ajax autocomplete call now contains all values from the form (see the urlparams variable): you can easier make filtered popups 18 | ++++++++++++++++++ 19 | 20 | 0.5.0 (2021-03-05) 21 | HiddenAdmin: allow make related admins for search_fields=.. but hide them for direct access (example: we have them better accessible as Inlines) 22 | ++++++++++++++++++ 23 | 24 | 0.4.0 (2021-03-04) 25 | INCOMPATIBLE: expand_ajax_location_search func renamed to expand_ajax_params (please rename the function if you have it in your javascript) 26 | wrapper for queryset filtering moved from example (ie. from commented code) to real code; new method .get_search_results_ajax() in ModelAdmin 27 | new documentation in usage.rst 28 | ++++++++++++++++++ 29 | 30 | 0.3.0 (2021-03-03) 31 | ++++++++++++++++++ 32 | 33 | * if used in INSTALLED_APPS before django.contrib.admin (or admin rewriting app), danger ForeignKey buttons (edit,delete) will disapear 34 | * import admin methods (example: .register): in many cases you can just `import autocomplete_all as admin` and no more changes in admin.py are needed 35 | 36 | 0.2.6 (2020-05-06) 37 | ++++++++++++++++++ 38 | 39 | * Fix: added class Media to fix some scenario(s) where widget is missing 40 | 41 | 0.2.4 (2020-01-27) 42 | ++++++++++++++++++ 43 | 44 | * gives additional context in get_search_results() 45 | * Fix: missing .js (in 0.2.0-0.2.3) 46 | 47 | 0.1.6 (2020-01-24) 48 | ++++++++++++++++++ 49 | 50 | * Fix in docs: proper attribute name is: autocomplete_except 51 | 52 | 0.1.4 (2020-01-22) 53 | ++++++++++++++++++ 54 | 55 | * First acceptable version. 56 | -------------------------------------------------------------------------------- /README_.md: -------------------------------------------------------------------------------- 1 | # django-admin-autocomplete-all 2 | Django admin: Use select2 (autocomplete_fields) everywhere. Implicit is better than explicit. Because it is brief and easy. 3 | In addition gives improved context in get_search_results so you can apply filters based on current s with same ForeignKey (example: User). 6 | In such case you cannot identify on the server-side (in get_search_results) which one 9 | but you can add more (see bellow) and implement dynamic filters (dependent on current form values) too. 10 | 11 | EXAMPLE: 12 | this is automatically called: source ModelAdmin, class Media, js = ('autocomplete_all/js/autocomplete_all.js',) 13 | target ModelAdmin: 14 | def get_search_results(self, request, queryset, search_term): 15 | queryset, use_distinct = super().get_search_results(request, queryset, search_term) 16 | if request.is_ajax and '/autocomplete/' in request.path: 17 | url = urllib.parse.urlparse(request.headers['Referer']) 18 | referer = url.path 19 | qs = urllib.parse.parse_qs(url.query) 20 | if '/npo/finding/' in referer: # /// 21 | if qs.get('key') == ['id_process']: # (parse_qs results are lists) 22 | queryset = queryset.filter(...) 23 | return queryset, use_distinct 24 | */ 25 | 26 | /* I leave this, not able make the fake Admin working outside of Admin */ 27 | // /* Django native admin/js/autocomplete.js depends on presence of django.jQuery. 28 | // Outside of Admin, if this .js is called before autocomplete.js, following will make possible autocomplete.js to work. 29 | // This is skipped inside Admin where django.jQuery exists. 30 | // */ 31 | // if (typeof(django) === "undefined") { 32 | // django = {}; 33 | // } 34 | // if (typeof(django.jQuery) === "undefined") { 35 | // django.jQuery = $; 36 | // } 37 | 38 | document.addEventListener("DOMContentLoaded", function () { 39 | (function ($) { 40 | $('select.admin-autocomplete').on('select2:opening', function (evt) { 41 | if (!window.history.orig_pathname) { 42 | window.history.orig_pathname = window.location.pathname; 43 | } 44 | this.modified_location_search_key = '?key=' + this.id; 45 | this.modified_location_search = this.modified_location_search_key + expand_ajax_params($, this.id); 46 | window.history.replaceState(null, null, window.history.orig_pathname + this.modified_location_search); 47 | }); 48 | $('select.admin-autocomplete').on('select2:closing', function (evt) { 49 | var keypart = (window.location.search + '&').split('&', 1)[0]; 50 | if (keypart === this.modified_location_search_key) { // opening of new runs earlier of closing the old one :( 51 | window.history.replaceState(null, null, window.history.orig_pathname); 52 | } 53 | }); 54 | })(django.jQuery || $); 55 | }); 56 | 57 | /* 58 | If you need dynamic filter based on some current value of other field in your admin form then: 59 | You can add second (yours) ModelAdmin Media js file and there rewrite the function expand_ajax_params. 60 | Example: 61 | In ModelAdmin, class Media: js = ('autocomplete_all/js/autocomplete_all.js', /js/autocomplete_asset.js) 62 | In autocomplete_asset.js: 63 | function expand_ajax_params($, key) { 64 | if (key === 'id_asset') { // we need dynamic filtering with 'asset' foreignkey only 65 | return '&city=' + $('#id_city').val() + &country=' + $('#id_country').val(); // ie. give only assets from London+UK 66 | } else { 67 | return '' 68 | } 69 | } 70 | (Or you could make it easier and give parameters always regardless on the current s with same target model of ForeignKey** (example: User, in two different roles). 155 | In such case you cannot identify on the server-side (in get_search_results) which one . 159 | 160 | 161 | 3. Hide danger buttons in Admin ChangeForm. 162 | ------------------------------------------- 163 | 164 | The edit & delete buttons near the ForeignKey have very difficult and danger logic what they will do. 165 | If you add `autocomplete_all` in `INSTALLED_APPS` before `django.contrib.admin` (or some application which replaces admin design, like `django-baton`), 166 | then the danger buttons will disapear. Place the `autocomplete_all` "lower" in `INSTALLED_APPS` if you don't want this effect. 167 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # complexity documentation build configuration file, created by 4 | # sphinx-quickstart on Tue Jul 9 22:26:36 2013. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | import sys, os 15 | 16 | # If extensions (or modules to document with autodoc) are in another directory, 17 | # add these directories to sys.path here. If the directory is relative to the 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. 19 | #sys.path.insert(0, os.path.abspath('.')) 20 | 21 | cwd = os.getcwd() 22 | parent = os.path.dirname(cwd) 23 | sys.path.append(parent) 24 | 25 | import autocomplete_all 26 | 27 | # -- General configuration ----------------------------------------------------- 28 | 29 | # If your documentation needs a minimal Sphinx version, state it here. 30 | #needs_sphinx = '1.0' 31 | 32 | # Add any Sphinx extension module names here, as strings. They can be extensions 33 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 34 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] 35 | 36 | # Add any paths that contain templates here, relative to this directory. 37 | templates_path = ['_templates'] 38 | 39 | # The suffix of source filenames. 40 | source_suffix = '.rst' 41 | 42 | # The encoding of source files. 43 | #source_encoding = 'utf-8-sig' 44 | 45 | # The master toctree document. 46 | master_doc = 'index' 47 | 48 | # General information about the project. 49 | project = u'django-admin-autocomplete-all' 50 | copyright = u'2020, Mirek Zvolský' 51 | 52 | # The version info for the project you're documenting, acts as replacement for 53 | # |version| and |release|, also used in various other places throughout the 54 | # built documents. 55 | # 56 | # The short X.Y version. 57 | version = autocomplete_all.__version__ 58 | # The full version, including alpha/beta/rc tags. 59 | release = autocomplete_all.__version__ 60 | 61 | # The language for content autogenerated by Sphinx. Refer to documentation 62 | # for a list of supported languages. 63 | #language = None 64 | 65 | # There are two options for replacing |today|: either, you set today to some 66 | # non-false value, then it is used: 67 | #today = '' 68 | # Else, today_fmt is used as the format for a strftime call. 69 | #today_fmt = '%B %d, %Y' 70 | 71 | # List of patterns, relative to source directory, that match files and 72 | # directories to ignore when looking for source files. 73 | exclude_patterns = ['_build'] 74 | 75 | # The reST default role (used for this markup: `text`) to use for all documents. 76 | #default_role = None 77 | 78 | # If true, '()' will be appended to :func: etc. cross-reference text. 79 | #add_function_parentheses = True 80 | 81 | # If true, the current module name will be prepended to all description 82 | # unit titles (such as .. function::). 83 | #add_module_names = True 84 | 85 | # If true, sectionauthor and moduleauthor directives will be shown in the 86 | # output. They are ignored by default. 87 | #show_authors = False 88 | 89 | # The name of the Pygments (syntax highlighting) style to use. 90 | pygments_style = 'sphinx' 91 | 92 | # A list of ignored prefixes for module index sorting. 93 | #modindex_common_prefix = [] 94 | 95 | # If true, keep warnings as "system message" paragraphs in the built documents. 96 | #keep_warnings = False 97 | 98 | 99 | # -- Options for HTML output --------------------------------------------------- 100 | 101 | # The theme to use for HTML and HTML Help pages. See the documentation for 102 | # a list of builtin themes. 103 | html_theme = 'default' 104 | 105 | # Theme options are theme-specific and customize the look and feel of a theme 106 | # further. For a list of options available for each theme, see the 107 | # documentation. 108 | #html_theme_options = {} 109 | 110 | # Add any paths that contain custom themes here, relative to this directory. 111 | #html_theme_path = [] 112 | 113 | # The name for this set of Sphinx documents. If None, it defaults to 114 | # " v documentation". 115 | #html_title = None 116 | 117 | # A shorter title for the navigation bar. Default is the same as html_title. 118 | #html_short_title = None 119 | 120 | # The name of an image file (relative to this directory) to place at the top 121 | # of the sidebar. 122 | #html_logo = None 123 | 124 | # The name of an image file (within the static path) to use as favicon of the 125 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 126 | # pixels large. 127 | #html_favicon = None 128 | 129 | # Add any paths that contain custom static files (such as style sheets) here, 130 | # relative to this directory. They are copied after the builtin static files, 131 | # so a file named "default.css" will overwrite the builtin "default.css". 132 | html_static_path = ['_static'] 133 | 134 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 135 | # using the given strftime format. 136 | #html_last_updated_fmt = '%b %d, %Y' 137 | 138 | # If true, SmartyPants will be used to convert quotes and dashes to 139 | # typographically correct entities. 140 | #html_use_smartypants = True 141 | 142 | # Custom sidebar templates, maps document names to template names. 143 | #html_sidebars = {} 144 | 145 | # Additional templates that should be rendered to pages, maps page names to 146 | # template names. 147 | #html_additional_pages = {} 148 | 149 | # If false, no module index is generated. 150 | #html_domain_indices = True 151 | 152 | # If false, no index is generated. 153 | #html_use_index = True 154 | 155 | # If true, the index is split into individual pages for each letter. 156 | #html_split_index = False 157 | 158 | # If true, links to the reST sources are added to the pages. 159 | #html_show_sourcelink = True 160 | 161 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 162 | #html_show_sphinx = True 163 | 164 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 165 | #html_show_copyright = True 166 | 167 | # If true, an OpenSearch description file will be output, and all pages will 168 | # contain a tag referring to it. The value of this option must be the 169 | # base URL from which the finished HTML is served. 170 | #html_use_opensearch = '' 171 | 172 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 173 | #html_file_suffix = None 174 | 175 | # Output file base name for HTML help builder. 176 | htmlhelp_basename = 'django-admin-autocomplete-alldoc' 177 | 178 | 179 | # -- Options for LaTeX output -------------------------------------------------- 180 | 181 | latex_elements = { 182 | # The paper size ('letterpaper' or 'a4paper'). 183 | #'papersize': 'letterpaper', 184 | 185 | # The font size ('10pt', '11pt' or '12pt'). 186 | #'pointsize': '10pt', 187 | 188 | # Additional stuff for the LaTeX preamble. 189 | #'preamble': '', 190 | } 191 | 192 | # Grouping the document tree into LaTeX files. List of tuples 193 | # (source start file, target name, title, author, documentclass [howto/manual]). 194 | latex_documents = [ 195 | ('index', 'django-admin-autocomplete-all.tex', u'django-admin-autocomplete-all Documentation', 196 | u'Mirek Zvolský', 'manual'), 197 | ] 198 | 199 | # The name of an image file (relative to this directory) to place at the top of 200 | # the title page. 201 | #latex_logo = None 202 | 203 | # For "manual" documents, if this is true, then toplevel headings are parts, 204 | # not chapters. 205 | #latex_use_parts = False 206 | 207 | # If true, show page references after internal links. 208 | #latex_show_pagerefs = False 209 | 210 | # If true, show URL addresses after external links. 211 | #latex_show_urls = False 212 | 213 | # Documents to append as an appendix to all manuals. 214 | #latex_appendices = [] 215 | 216 | # If false, no module index is generated. 217 | #latex_domain_indices = True 218 | 219 | 220 | # -- Options for manual page output -------------------------------------------- 221 | 222 | # One entry per manual page. List of tuples 223 | # (source start file, name, description, authors, manual section). 224 | man_pages = [ 225 | ('index', 'django-admin-autocomplete-all', u'django-admin-autocomplete-all Documentation', 226 | [u'Mirek Zvolský'], 1) 227 | ] 228 | 229 | # If true, show URL addresses after external links. 230 | #man_show_urls = False 231 | 232 | 233 | # -- Options for Texinfo output ------------------------------------------------ 234 | 235 | # Grouping the document tree into Texinfo files. List of tuples 236 | # (source start file, target name, title, author, 237 | # dir menu entry, description, category) 238 | texinfo_documents = [ 239 | ('index', 'django-admin-autocomplete-all', u'django-admin-autocomplete-all Documentation', 240 | u'Mirek Zvolský', 'django-admin-autocomplete-all', 'One line description of project.', 241 | 'Miscellaneous'), 242 | ] 243 | 244 | # Documents to append as an appendix to all manuals. 245 | #texinfo_appendices = [] 246 | 247 | # If false, no module index is generated. 248 | #texinfo_domain_indices = True 249 | 250 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 251 | #texinfo_show_urls = 'footnote' 252 | 253 | # If true, do not generate a @detailmenu in the "Top" node's menu. 254 | #texinfo_no_detailmenu = False 255 | --------------------------------------------------------------------------------