{ "info": { "author": "Stanislas Guerra", "author_email": "stanislas.guerra@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "===============================\nAnother Ajax Auto-Complete, Yet\n===============================\n\n.. image:: https://coveralls.io/repos/Starou/django-yaaac/badge.png\n :target: https://coveralls.io/r/Starou/django-yaaac\n\n.. image:: https://img.shields.io/pypi/v/django_yaaac.svg\n :target: https://pypi.python.org/pypi/django-yaaac\n\n.. image:: https://img.shields.io/pypi/pyversions/django_yaaac.svg\n :target: https://pypi.python.org/pypi/django-yaaac/\n :alt: Supported Python versions\n\n.. image:: https://img.shields.io/pypi/l/django_yaaac.svg\n :target: https://pypi.python.org/pypi/django-yaaac/\n :alt: License\n\n.. image:: https://travis-ci.org/Starou/django-yaaac.svg\n :target: https://travis-ci.org/Starou/django-yaaac\n :alt: Travis C.I.\n\n\n*Yaaac* is lightweight Django application providing Ajax search to foreign-key form fields.\n\nVersion 3 upgrade warning\n=========================\n\nThis version brings Python 3.6 compatibility with a minor regression.\nThe default ``suggest_by`` is now ``__str__`` instead of ``__unicode__`` so check\nthe `Django documentation `_\nto migrate your code.\n\nDjango 2-2 and Version 3.2 important note\n=========================================\n\nSince Django-2.2 the way `asserts are sorted has been completely rewritten `_\nand as the result breaks this lib in the admin. The fix was to embbed jQuery and set the\ndependency in the widgets Media classes which may leads to other regressions.\n\nSince a `autocomplete solution `_\nis now built-in Django admin, the support for the admin has been removed.\n\n\nInstallation\n============\n\nInstall the app from the source::\n\n python setup.py build && (sudo) python setup.py install\n\nOr with *pip*::\n\n pip install django-yaaac\n\n(for Django < 1.8, use a previous version like ``pip install django-yaaac==1.9.0``)\n\nAdd the app in your settings.INSTALLED_APPS:\n\n.. code-block:: python\n\n INSTALLED_APPS = [\n ...,\n \"django_yaaac\",\n ...,\n ]\n\nIn the *urls.py* module of your project, define the url pattern for ajax calls:\n\n.. code-block:: python\n\n from django_yaaac.manager import autocomplete\n from django.conf.urls import url\n\n urlpatterns = [\n ...\n url(r'^yaaac/', autocomplete.urls),\n ...\n ]\n\nUsage\n=====\n\nForms\n-----\n\nWhat you need to do is to declare a custom *ModelForm*:\n\n.. code-block:: python\n\n from django import forms\n from django.contrib import admin\n from django_yaaac.forms.fields import AutocompleteModelChoiceField\n from . import models\n\n\n class BandMemberForm(forms.ModelForm):\n band = AutocompleteModelChoiceField(site=admin.site,\n queryset=models.Band.objects.all(),\n yaaac_opts={\n \"search_fields\": [\"^name\"],\n \"suggest_by\": \"get_full_name\",\n \"min_chars\": 3, # Fire search when 3 chars are sent (1 by default.)\n \"max_height\": 400, # 300px by default.\n \"width\": 250, # 300px by default.\n },\n required=True)\n class Meta:\n model = models.BandMember\n\n class Media:\n # You need jQuery. Don't forget to call {{ form.media }} in your template.\n js = ('js/jquery.min.js', )\n\n\n admin.site.register(models.BandMember, BandMemberAdmin)\n\nThe *site* parameter of *AutocompleteModelChoiceField* is required for related lookup (the\nmagnifier glass). The *search_fields* is a list of fields to search against using the same syntax\nas in Django Admin (^, $ etc).\nExtra options *min_chars*, *max_height* and *width* are the counter-part of *minChars*, *maxHeight* and *width*\nin `Autocomplete options `_.\n\n*suggest_by* is optional. It can be a field or a method of the model.\nBy default, suggestions are shown using *__unicode__* method.\n\nIf your model define a ``get_absolute_url()`` method, the label is a link to that resource.\n\nModels\n------\n\nThe ``Yaaac`` class must defines the following:\n\n- ``user_passes_test`` is a class method that takes a user and return True or False.\n- ``allows_suggest_by`` is a list of model fields or methods that can used as return value by the search view.\n\n.. code-block:: python\n\n class BandMember(models.Model):\n first_name = models.CharField(max_length=100)\n last_name = models.CharField(max_length=100)\n band = models.ForeignKey(\"Band\", null=True, blank=True)\n favorite_instrument = models.ForeignKey(\"Instrument\", null=True, blank=True)\n\n class Meta:\n unique_together = (('first_name', 'last_name'),)\n\n class Yaaac:\n user_passes_test = lambda instance, user: user and user.is_authenticated() or False\n allows_suggest_by = ['get_full_name']\n\n def __unicode__(self):\n return u\"%s %s\" % (self.first_name, self.last_name)\n\n def get_full_name(self):\n return u\"%s %s\" % (self.first_name, self.last_name)\n\nTuning\n======\n\nTo ease the DOM manipulation, HTML classes are added to the elements. The most interesting being ``yaaac_``\nto the hidden input storing the foreign key value. This is very convenient when you need to add behavior to a whole\nset of fields - also those that don't exist when the page is created - sharing the same name.\n\nUse jQuery delegation (i.e. ``$(\".foo\").on(\"change\", \".yaaac_first_name\")``) to place an event on one field for all\nthe inline forms present in the page or to come (i.e. Click on \"Add a new Band Member\".)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Starou/django-yaaac", "keywords": "", "license": "BSD Licence", "maintainer": "", "maintainer_email": "", "name": "django-yaaac", "package_url": "https://pypi.org/project/django-yaaac/", "platform": "", "project_url": "https://pypi.org/project/django-yaaac/", "project_urls": { "Homepage": "https://github.com/Starou/django-yaaac" }, "release_url": "https://pypi.org/project/django-yaaac/3.1.0/", "requires_dist": null, "requires_python": "", "summary": "Django application providing Ajax search capabilities.", "version": "3.1.0" }, "last_serial": 5567261, "releases": { "0.91.1": [ { "comment_text": "", "digests": { "md5": "8107921061be6f9a0eaea7fd6520f690", "sha256": "e347f4300d2aad609f1ba8fecfecc3968348b78c39af01ca0be58c82d1a788ed" }, "downloads": -1, "filename": "django-yaaac-0.91.1.tar.gz", "has_sig": false, "md5_digest": "8107921061be6f9a0eaea7fd6520f690", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 645558, "upload_time": "2013-10-10T13:34:05", "url": "https://files.pythonhosted.org/packages/a1/fe/ebfdd6c323ac0c576136850eb9132e772d58a4c59dbbc0dda880296bae17/django-yaaac-0.91.1.tar.gz" } ], "0.91.2": [ { "comment_text": "", "digests": { "md5": "a18fe837443063a0eb9261fb1078263d", "sha256": "d6e50dfde868a02291493a4c1e806be89cee5ac857cca03cbedf28a6f4be2590" }, "downloads": -1, "filename": "django-yaaac-0.91.2.tar.gz", "has_sig": false, "md5_digest": "a18fe837443063a0eb9261fb1078263d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 646336, "upload_time": "2013-10-12T09:24:46", "url": "https://files.pythonhosted.org/packages/5b/62/d051e9e4ad2a7fbf2ae175605a74dc48409b6731f97147fcdeb391216b3e/django-yaaac-0.91.2.tar.gz" } ], "0.92.1": [ { "comment_text": "", "digests": { "md5": "664a6f8b8df60b5bbeec6e34b9d2c977", "sha256": "427406df9607821bbbd1dcbd4abb5942f218776e8e191bc7a4d0dcb97655439c" }, "downloads": -1, "filename": "django-yaaac-0.92.1.tar.gz", "has_sig": false, "md5_digest": "664a6f8b8df60b5bbeec6e34b9d2c977", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 646324, "upload_time": "2013-10-14T11:44:33", "url": "https://files.pythonhosted.org/packages/6b/69/61aa2e83be377c80c652abebb01fa2a76e66870598aa29e79107608271d9/django-yaaac-0.92.1.tar.gz" } ], "0.92.2": [ { "comment_text": "", "digests": { "md5": "3370c732eb72c6a54667ecd0ddcf06df", "sha256": "694e0c8fbca91fc2ce70bd0a066deba2fdb5bde0abb892ab12cc2392d7d6df90" }, "downloads": -1, "filename": "django-yaaac-0.92.2.tar.gz", "has_sig": false, "md5_digest": "3370c732eb72c6a54667ecd0ddcf06df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 646860, "upload_time": "2013-10-16T12:13:58", "url": "https://files.pythonhosted.org/packages/1d/24/1106201b2e2d233303d6193ef9d8a240687175109cc7858143e0c7b3cfed/django-yaaac-0.92.2.tar.gz" } ], "0.92.3": [ { "comment_text": "", "digests": { "md5": "d9afaad75ddca9c45cf50dd107288461", "sha256": "6c6ec184516d975a34c6dbf5896dd82412ac4ac77c1b10c054239c5c9eea5524" }, "downloads": -1, "filename": "django-yaaac-0.92.3.tar.gz", "has_sig": false, "md5_digest": "d9afaad75ddca9c45cf50dd107288461", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 647219, "upload_time": "2013-10-17T13:04:48", "url": "https://files.pythonhosted.org/packages/98/f7/19711ca166a029700da4d9fa64ca45c06955b835b0b52cbd8ab94899794a/django-yaaac-0.92.3.tar.gz" } ], "0.92.4": [ { "comment_text": "", "digests": { "md5": "b61dd69dbea8a25166b2d9ad98463f29", "sha256": "30f3592c77333cc8359972f64ecd2c67dd7cc73d686c1bb63ca81a9edcc94fed" }, "downloads": -1, "filename": "django-yaaac-0.92.4.tar.gz", "has_sig": false, "md5_digest": "b61dd69dbea8a25166b2d9ad98463f29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 647911, "upload_time": "2013-10-17T16:25:11", "url": "https://files.pythonhosted.org/packages/33/ac/880a1d6cc53e3d8c78c897a08cf32aab2b74314aebc61fe68711a7a4a769/django-yaaac-0.92.4.tar.gz" } ], "0.92.5": [ { "comment_text": "", "digests": { "md5": "48f434a635efb93f763bf252793845a6", "sha256": "b02841da466fe5266e342a504fff8c243c8277a6e1c4fd9b2a991c13aa33304c" }, "downloads": -1, "filename": "django-yaaac-0.92.5.tar.gz", "has_sig": false, "md5_digest": "48f434a635efb93f763bf252793845a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648112, "upload_time": "2013-10-23T10:00:51", "url": "https://files.pythonhosted.org/packages/e4/e3/060a696024ef06e42967c57601422c7931000909b6ea2e499ad5b03ce969/django-yaaac-0.92.5.tar.gz" } ], "0.93.0": [ { "comment_text": "", "digests": { "md5": "fb491a2ef7f45e6b745327f61d6072d8", "sha256": "76fd052d348f0c5d5d9ca1dd07daf1ee046720d4f99cacc1d79ff62790d79fc0" }, "downloads": -1, "filename": "django-yaaac-0.93.0.tar.gz", "has_sig": false, "md5_digest": "fb491a2ef7f45e6b745327f61d6072d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648272, "upload_time": "2013-12-23T13:40:31", "url": "https://files.pythonhosted.org/packages/0a/cf/0a20956c95fb4b062f9850e37e122da6ba136c7a270085000ef94247f977/django-yaaac-0.93.0.tar.gz" } ], "0.94.0": [ { "comment_text": "", "digests": { "md5": "3c07c6272c5b00b5155e4a3bc380f40d", "sha256": "d079a5cb8241dbd1af56d70fc648cdf38f0ee98a765dc3ac9daa21a3095ae8bd" }, "downloads": -1, "filename": "django-yaaac-0.94.0.tar.gz", "has_sig": false, "md5_digest": "3c07c6272c5b00b5155e4a3bc380f40d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648284, "upload_time": "2014-04-30T13:27:27", "url": "https://files.pythonhosted.org/packages/06/d0/2999fe1dbe1377ae471d4b3a7365a1745a96896179d7c1c3e295b344bb50/django-yaaac-0.94.0.tar.gz" } ], "1.10.0": [ { "comment_text": "", "digests": { "md5": "818ed7391e4aa79a696c10591dd225e0", "sha256": "9035108f52be42ec2d279861ee23067457476ce2f3ddfabacc45f33631f0b499" }, "downloads": -1, "filename": "django-yaaac-1.10.0.tar.gz", "has_sig": false, "md5_digest": "818ed7391e4aa79a696c10591dd225e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 649133, "upload_time": "2017-07-03T14:47:21", "url": "https://files.pythonhosted.org/packages/7c/a8/d4a887cf90e6dfc23c74eb092383f260fe9981a14fa544bb76d6c1b576f3/django-yaaac-1.10.0.tar.gz" } ], "1.10.1": [ { "comment_text": "", "digests": { "md5": "f67b7c9ee70da3a8f2a2787420a8e0e3", "sha256": "edad82d77bd3084515a8b476f5cd2e25568cfbb3d696eda82e3455ae45086ab8" }, "downloads": -1, "filename": "django-yaaac-1.10.1.tar.gz", "has_sig": false, "md5_digest": "f67b7c9ee70da3a8f2a2787420a8e0e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 649197, "upload_time": "2017-07-06T15:48:41", "url": "https://files.pythonhosted.org/packages/7b/1d/6b635673a64e690bfab764d1ba1d0f70031a7874bfe7c922055a296df3bf/django-yaaac-1.10.1.tar.gz" } ], "1.10.2": [ { "comment_text": "", "digests": { "md5": "c3d5c833164adad3c1728c67799896c6", "sha256": "67bdee4ddf8ced35f1f620b69c6d0dadca8c3426d2900b4fec268d020ebcc8d3" }, "downloads": -1, "filename": "django-yaaac-1.10.2.tar.gz", "has_sig": false, "md5_digest": "c3d5c833164adad3c1728c67799896c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 650701, "upload_time": "2017-07-07T09:48:01", "url": "https://files.pythonhosted.org/packages/9f/81/3a070bd77f249eab6b3a7c898259376d5f40d1d1f438e5558ecd2773e684/django-yaaac-1.10.2.tar.gz" } ], "1.11.0": [ { "comment_text": "", "digests": { "md5": "d3a9ed4a39c1a111dd6c39ed2b4477e5", "sha256": "80f51c9c05bbd1cb86a65993b2ae85ee6ec79879ae4f5bf6b10b80d954f8ca1d" }, "downloads": -1, "filename": "django-yaaac-1.11.0.tar.gz", "has_sig": false, "md5_digest": "d3a9ed4a39c1a111dd6c39ed2b4477e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648934, "upload_time": "2017-07-21T08:13:17", "url": "https://files.pythonhosted.org/packages/48/a9/56da696c8c61e83e1725a1032ebaf223128f43844892b24d4b27b55aa413/django-yaaac-1.11.0.tar.gz" } ], "1.11.1": [ { "comment_text": "", "digests": { "md5": "d5b2d8dab86d744e0ef10bd1905aa0f0", "sha256": "746fb67c225d8c4e496c47a26b1571db65486fe6939fa0fb2b83e2ef9317bab0" }, "downloads": -1, "filename": "django-yaaac-1.11.1.tar.gz", "has_sig": false, "md5_digest": "d5b2d8dab86d744e0ef10bd1905aa0f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 654147, "upload_time": "2018-07-16T09:36:18", "url": "https://files.pythonhosted.org/packages/25/87/b91d4bcb1b2972346e6c4e049b6e0c0e5330d0efa56df72efa4618cecddd/django-yaaac-1.11.1.tar.gz" } ], "1.11.2": [ { "comment_text": "", "digests": { "md5": "73dbb81d65e7efdbd83d29e67af15764", "sha256": "7ba7782319f7c2406f3f9cb323d231d90e7676182c7487281a35ad6130fcad27" }, "downloads": -1, "filename": "django-yaaac-1.11.2.tar.gz", "has_sig": false, "md5_digest": "73dbb81d65e7efdbd83d29e67af15764", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 652309, "upload_time": "2018-07-25T12:48:55", "url": "https://files.pythonhosted.org/packages/80/7c/1920db7501bbfb10c382cf2c9ce4f2ec3db6ed4671ae87b53579d1111724/django-yaaac-1.11.2.tar.gz" } ], "1.8.0": [ { "comment_text": "", "digests": { "md5": "d12dda06a0e06eeeb5243112626c405f", "sha256": "108bf2465a07ca0010c55dc7f5196e5146c6764fdf8322caa74867306371a047" }, "downloads": -1, "filename": "django-yaaac-1.8.0.tar.gz", "has_sig": false, "md5_digest": "d12dda06a0e06eeeb5243112626c405f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648843, "upload_time": "2015-01-30T12:21:13", "url": "https://files.pythonhosted.org/packages/84/d0/5effcc4fc4b03db32ba109e611840dcb49028952f8bb1d8be4fb63fbfeb6/django-yaaac-1.8.0.tar.gz" } ], "1.8.1": [ { "comment_text": "", "digests": { "md5": "f4ce7e8d0a73b55a95463bc945858bae", "sha256": "3b7daa4eee91ad9a2ef270b43f8ac23c7b0a5f73286f97a72abfb80b44f800e8" }, "downloads": -1, "filename": "django-yaaac-1.8.1.tar.gz", "has_sig": false, "md5_digest": "f4ce7e8d0a73b55a95463bc945858bae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648863, "upload_time": "2015-01-30T14:13:37", "url": "https://files.pythonhosted.org/packages/67/42/d1050ed65f565a9a9e3ff9c4d66c4568cf22aaf0b9d44080b75612c9d957/django-yaaac-1.8.1.tar.gz" } ], "1.8.2": [ { "comment_text": "", "digests": { "md5": "628d8e5093d7a55944a5c4c29efeffc5", "sha256": "0a1869264f8a62785377c28ce45109e98b54e66e60861800f75febed396bfc7c" }, "downloads": -1, "filename": "django-yaaac-1.8.2.tar.gz", "has_sig": false, "md5_digest": "628d8e5093d7a55944a5c4c29efeffc5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648934, "upload_time": "2015-04-22T07:14:25", "url": "https://files.pythonhosted.org/packages/3a/76/31e26029261f225db5eda40bcc9e14e81c7a2790cd545f6b4fa07f10f288/django-yaaac-1.8.2.tar.gz" } ], "1.8.3": [ { "comment_text": "", "digests": { "md5": "ec7f0e7f94db7804445cf5b4d817485b", "sha256": "f92481e2a843d55914d379f6b11439679bf5f5dc80d68f1d082832e7bd695a76" }, "downloads": -1, "filename": "django-yaaac-1.8.3.tar.gz", "has_sig": false, "md5_digest": "ec7f0e7f94db7804445cf5b4d817485b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 648946, "upload_time": "2015-04-22T08:23:14", "url": "https://files.pythonhosted.org/packages/b2/c9/50b80f5445c85e666c0d96bc7bbd14683b193af3a9ec2b2dfb4b4ac626b2/django-yaaac-1.8.3.tar.gz" } ], "1.9.0": [ { "comment_text": "", "digests": { "md5": "701234547174364f8ec97ddb884ccf87", "sha256": "d2766570346843d12f060644553d72f85c78e27951bb0990db4fcb01d9f9db7a" }, "downloads": -1, "filename": "django-yaaac-1.9.0.tar.gz", "has_sig": false, "md5_digest": "701234547174364f8ec97ddb884ccf87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 649072, "upload_time": "2017-04-26T08:29:40", "url": "https://files.pythonhosted.org/packages/d7/94/1f06971f83b77ac131bee4fdf501f920f2aa7365d564c1011c8eb4adbb61/django-yaaac-1.9.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "ea3e41aa983dc0c194dce5aa41aa38a2", "sha256": "b08a29c2d43bcd53d79c60d073d9352c14cba56d766ce3670ed069f203e3694e" }, "downloads": -1, "filename": "django-yaaac-3.0.1.tar.gz", "has_sig": false, "md5_digest": "ea3e41aa983dc0c194dce5aa41aa38a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 695389, "upload_time": "2018-12-17T12:56:53", "url": "https://files.pythonhosted.org/packages/d1/1e/138d603698122a93190b15b229cd3e1953109fec938cf266625f3dfb1522/django-yaaac-3.0.1.tar.gz" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "173e7b5f1b347ed3be140f03202e146b", "sha256": "7ce344aaf1b1ede19d5150b7d3f9074301392065c5e8110b8e9a04826f48543c" }, "downloads": -1, "filename": "django-yaaac-3.1.0.tar.gz", "has_sig": false, "md5_digest": "173e7b5f1b347ed3be140f03202e146b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57706, "upload_time": "2019-07-22T12:49:12", "url": "https://files.pythonhosted.org/packages/f4/36/3e909ca3393907c193f42da42becc74a90e8df68b7da5c3abbe4122f786b/django-yaaac-3.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "173e7b5f1b347ed3be140f03202e146b", "sha256": "7ce344aaf1b1ede19d5150b7d3f9074301392065c5e8110b8e9a04826f48543c" }, "downloads": -1, "filename": "django-yaaac-3.1.0.tar.gz", "has_sig": false, "md5_digest": "173e7b5f1b347ed3be140f03202e146b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57706, "upload_time": "2019-07-22T12:49:12", "url": "https://files.pythonhosted.org/packages/f4/36/3e909ca3393907c193f42da42becc74a90e8df68b7da5c3abbe4122f786b/django-yaaac-3.1.0.tar.gz" } ] }