Skip to main content

Provides date and date/time fields with restrictions for Django forms.

Project description

Add this package to your virtual environment. In your Django application’s forms.py, import the field(s) you want to use (currently only RestrictedDateField and RestrictedDateTimeField). These offer additional options:

  • future_allowed=False – inhibit the input of dates / times that are in the future

  • past_allowed=False – inhibit the input of dates / times that are in the past

  • min_value=X, max_value=X – inhibit the input of dates / times before / after X, where X can be a Python date / datetime value or a callable that returns such a value

Most browsers will display a date and / or time picker whose range is limited by these options.

Other than with Django’s native fields, dates (and times) should be formatted according to the locale settings of the browser (which normally is the right thing to do).

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_restricted_fields-0.3.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django_restricted_fields-0.3.2.tar.gz.

File metadata

File hashes

Hashes for django_restricted_fields-0.3.2.tar.gz
Algorithm Hash digest
SHA256 590018d965cc82a81c26988d12102eaac0201180a2819a8c7149ce9de24873c6
MD5 9b205b22726f5d1e982bd1b2966d97e0
BLAKE2b-256 b879b6cde0592c030981ed34c9e53842f677bcaeed7d9d4c19b5b451700959f2

See more details on using hashes here.

File details

Details for the file django_restricted_fields-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_restricted_fields-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 523dbb4d82d12860074d569db2e1472d946de2cb889387037fa4f14fc477339e
MD5 5e9fc0179c225499589f4629cfd23b41
BLAKE2b-256 91ad8f413b2802cc96d33389269e186d313a0254e90900335e79bc13d8ad2ea3

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