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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-split-input-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 449a9c5e4bbe27e99a594d0d1a367bf4503a7824908ff8b8c272ae48a104ca69
MD5 6232a5086e4428794e9d12acc88854cd
BLAKE2b-256 b2c821c99143f41c6a9b751b2570e3c66893a652e1ca5c554722cf539a19c229

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_split_input-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05faf416392cf5169beff6003ff03e04b6ff6e9decbf6160478c37f1eb849497
MD5 010402653de7d71518ba73ddc448ebd6
BLAKE2b-256 09170d91ef8cca239e3ca66d83e8b6eab6843da8299c231072cf77bc19a1e006

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