Skip to main content

A replacement for the Select widget with fancy new features - powered by choices.js!

Project description

django-cjswidget PyPI

A replacement for the Select widget with fancy new features - powered by choices.js!

Install

  1. Add "cjswidget" to your INSTALLED_APPS:
INSTALLED_APPS = [
    ...
    'cjswidget',
]

Use

Use in place of a normal select widget, that's all!

from cjswidget.widgets import CJSWidget

class MyForm(ModelForm):
    class Meta:
        model = Profile
        fields = ('country', 'region')
        widgets = {
            'country': CJSWidget(),
            'region': CJSWidget(options={'shouldSort': False}),
        }

License

This software is released under the MIT license.

Copyright (c) 2019-2026 Luke Rogers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_cjswidget-0.7.0.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_cjswidget-0.7.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file django_cjswidget-0.7.0.tar.gz.

File metadata

  • Download URL: django_cjswidget-0.7.0.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for django_cjswidget-0.7.0.tar.gz
Algorithm Hash digest
SHA256 35618a1e9fb34d3e32cdfdde209cf0013eb0e26540c245be4d1b85467d9542a7
MD5 d4eefcc628f2e9467a01989c6262fa3f
BLAKE2b-256 7ae2a8babeeef77974c16196f965911f105ceaf217fafb4f1e8d178944be116a

See more details on using hashes here.

File details

Details for the file django_cjswidget-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: django_cjswidget-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for django_cjswidget-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97946ac3c9fd3353fd6f189c774f3d3fb3d88d26fa285158d1732192126d7d50
MD5 1ca56c587840babb6e31e4f83232a5a2
BLAKE2b-256 0edc88b3805e527b8e0ac5bff14f1827233e102276932f3373f01d7967c925c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page