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
Built Distribution
File details
Details for the file django_restricted_fields-0.3.2.tar.gz
.
File metadata
- Download URL: django_restricted_fields-0.3.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 590018d965cc82a81c26988d12102eaac0201180a2819a8c7149ce9de24873c6 |
|
MD5 | 9b205b22726f5d1e982bd1b2966d97e0 |
|
BLAKE2b-256 | b879b6cde0592c030981ed34c9e53842f677bcaeed7d9d4c19b5b451700959f2 |
File details
Details for the file django_restricted_fields-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: django_restricted_fields-0.3.2-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 523dbb4d82d12860074d569db2e1472d946de2cb889387037fa4f14fc477339e |
|
MD5 | 5e9fc0179c225499589f4629cfd23b41 |
|
BLAKE2b-256 | 91ad8f413b2802cc96d33389269e186d313a0254e90900335e79bc13d8ad2ea3 |