A Django date widget optimised for usability in entering dates of birth
Project description
A Django date widget optimised for usability in entering dates of birth.
This is based on the guidelines put forward by the UK Government Digital Service at https://designnotes.blog.gov.uk/2013/12/05/asking-for-a-date-of-birth/
Usage:
from django import forms from dobwidget import DateOfBirthWidget class PersonModelForm(forms.ModelForm): """ Model form for people. """ class Meta(object): model = Person fields = ['name', 'date_of_birth'] widgets = { 'date_of_birth': DateOfBirthWidget(), }
The DateOfBirthWidget can take an optional order parameter, to make it useful in non-UK jurisdictions:
class Meta(object): model = Person fields = ['name', 'date_of_birth'] widgets = { 'date_of_birth': DateOfBirthWidget(order='MDY'), }
Changes
1.0
Initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for django_dob_widget-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40ae5d1bd94e6a39ac06f2f3f5469edb83843fb5c3d2d0f655b91f35bd21d3d5 |
|
MD5 | fe3132d040943a1bfac5f89770946174 |
|
BLAKE2b-256 | c0cb3284c6baed281155f47b13cd4126f56cb6746017ef10ce1b75f0c81376b0 |