Skip to main content

A widget to have a django text input split into multiple HTML inputs.

Project description

django_split_input

About

This is a django widget for multiple fixed size inputs for one form field. These could be used for those super fancy verification code forms. The cursor is moved to the next input field using JS/jQuery.

django_split_input Showcase

Usage

  1. Install django_split_input and add it to your INSTALLED_APPS.

    pip install django-split-input
    

    In your settings.py:

    "django_split_input",
    
  2. Install jQuery using your preferred method (e.g. django-yarnpkg)

  3. Create a form with a CharField.

  4. Use SplitInput as a widget and supply the sizes of all input fields.

from django import forms
from django_split_input import SplitInput


class VerificationForm(forms.Form):
   auth_code = forms.CharField(label='Code', widget=SplitInput(sizes=(3, 3, 3)))

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-split-input-0.2.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

django_split_input-0.2.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file django-split-input-0.2.2.tar.gz.

File metadata

  • Download URL: django-split-input-0.2.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1+ Linux/5.10.0-2-amd64

File hashes

Hashes for django-split-input-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e1082b4f183dcaf549127d7ec65b0fdb4497dd263cde7cc6be11ac0736a2a2ec
MD5 1a7cacb5134a6284a3f487dada3d195b
BLAKE2b-256 97dc333c10a92e76f70ce2ab12626a2371251104afac08b7c07bf71748a08b13

See more details on using hashes here.

File details

Details for the file django_split_input-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_split_input-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b225c3896e2340678a5bc1f0640e19772a800f7d667e128e757efecfa2f9bfa
MD5 6d05da5364000b858f48d57788cc8581
BLAKE2b-256 979a0b0156a657b8e17a90814786b9c9689f8343e66b393144b69a05059581d4

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