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.6.0.tar.gz (28.8 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.6.0-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_cjswidget-0.6.0.tar.gz
  • Upload date:
  • Size: 28.8 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.6.0.tar.gz
Algorithm Hash digest
SHA256 0a61d0c9d41ed03a9ff793c44284129a2a093a1087e0abb8619c43849b9b662a
MD5 ec68a47de8ed472a47ecd274c6eb9c35
BLAKE2b-256 bfc03a9e3e4b83d10e43279c7dc891e561d443b570efff5c71f3e7134c91c45b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_cjswidget-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 25.9 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ae52be15be0b95476cd898a385895e26ee01c20b9cf652de02471e9ab2a1d12
MD5 6c0a03b351671a29d327c1e377f46f2a
BLAKE2b-256 916539525cd947f4316a983d2da8edca6adc4618072363e55fe6947831247485

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