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-2020 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.4.1.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

django_cjswidget-0.4.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file django-cjswidget-0.4.1.tar.gz.

File metadata

  • Download URL: django-cjswidget-0.4.1.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for django-cjswidget-0.4.1.tar.gz
Algorithm Hash digest
SHA256 fa131d1499221a40185a186b53d51ccfd2f0ea59cc994a12c543228863f02c83
MD5 91e2c4fb7a9c8e97392e930bae67c340
BLAKE2b-256 f3beccfd18ff5a505e7b92510ba7a8eab21fefebf983f68b102a4d21c10cb858

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_cjswidget-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37bef8d87d8244c85416950b8af23ff072512abda97cbf83251771cbeb1597f9
MD5 0f50f156f61d4b1a6808f7e9759ea590
BLAKE2b-256 818e8fcee9c250f47cdec7ccfb776f13186980d10c7d514311ebff69e687dee4

See more details on using hashes here.

Supported by

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