{"id":17035013,"url":"https://github.com/justquick/django-chosen-ajax","last_synced_at":"2025-10-14T11:40:32.697Z","repository":{"id":9693176,"uuid":"11641102","full_name":"justquick/django-chosen-ajax","owner":"justquick","description":"Integrates chosen javascript library with ajax autocomplete functionality into the django admin","archived":false,"fork":false,"pushed_at":"2022-08-22T13:06:13.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T16:59:30.929Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justquick.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-24T17:42:23.000Z","updated_at":"2022-08-22T13:06:17.000Z","dependencies_parsed_at":"2022-08-25T23:21:12.206Z","dependency_job_id":null,"html_url":"https://github.com/justquick/django-chosen-ajax","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justquick/django-chosen-ajax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justquick%2Fdjango-chosen-ajax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justquick%2Fdjango-chosen-ajax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justquick%2Fdjango-chosen-ajax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justquick%2Fdjango-chosen-ajax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justquick","download_url":"https://codeload.github.com/justquick/django-chosen-ajax/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justquick%2Fdjango-chosen-ajax/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019060,"owners_count":26086517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:45:17.058Z","updated_at":"2025-10-14T11:40:32.661Z","avatar_url":"https://github.com/justquick.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":":Version: 0.1.0\nOverview\n==================\n\n.. image:: http://i.imgur.com/wK54oJF.jpg?3\n\ndjango-chosen-ajax implements the `chosen \u003chttp://harvesthq.github.io/chosen/\u003e`_ javascript library into the django admin for select form elements. It also implements ajax autocomplete functionality for form fields which have large numbers of related objects. The library currently uses `jquery \u003chttp://www.jquery.com\u003e`_ and was inspired by `django-chosen \u003chttps://github.com/theatlantic/django-chosen\u003e`_ and `chosen-ajax \u003chttps://github.com/meltingice/ajax-chosen\u003e`_.\n\nFeatures\n--------\n\n- Integrates `chosen \u003chttp://harvesthq.github.io/chosen/\u003e`_ into the admin\n- Implements ajax functionality for ModelMultipleChoiceField's\n\n\nInstall\n-------\n\nInstall with pip\n\n::\n\n    pip install git+https://github.com/epicowl/django-chosen-ajax.git#egg=django-chosen-ajax\n\nAdd ``chosen`` to your ``INSTALLED_APPS``\n\nRun ``collectstatic``\n\nCompatibility\n^^^^^^^^^^^^^\n\ndjango-chosen-ajax has been tested with\n\n:Django: 1.4, 1.5\n:Python: 2.7\n:Database: PostgreSQL\n\nUsage\n------\n\nSubclass the ChosenAdminForm using the ChosenAjaxField for ajax fields and include the required ``search_fields=('field',)`` where ``field`` is the name of a database field to use for the search lookup.\n\n.. code-block:: python\n\n    from chosen.forms import ChosenAdminForm\n    from chosen.fields import ChosenAjaxField\n\n\n    class PonyForm(ChosenAdminForm):\n        ponies = ChosenAjaxField(\n            required=False, \n            queryset=Pony.objects.all(), \n            search_fields=('name', 'breed',)\n        )\n\n        class Meta:\n            model = YourModel\n\n\nCurrently you will also have to add the admin site to your ModelAdmin to make the green add related button work.\n\n.. code-block:: python\n\n    from django.contrib import admin\n    from ponyapp.forms import PonyForm\n\n\n    class PonyAdmin(admin.ModelAdmin):\n        form = PonyForm\n\n        def __init__(self, model, admin_site):\n            super(PonyAdmin, self).__init__(model, admin_site)\n            self.form.admin_site = admin_site\n\n\nYou can add as many fields to search_fields as you need, they get combined into a lookup. Everything else is automatic and handled in the ChosenAdminForm.\n\nHit me up if you have questions or want to contribute!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustquick%2Fdjango-chosen-ajax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustquick%2Fdjango-chosen-ajax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustquick%2Fdjango-chosen-ajax/lists"}