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).
Release files for django-restricted-fields 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_restricted_fields-0.3.1.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_restricted_fields-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / django_restricted_fields-0.3.1.tar.gz
| Download URL | django_restricted_fields-0.3.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64b5f29f878a85ed8c28dd32a2b7630c41d216df87b4036d01c5821cb74bb136
|
|
BLAKE2b-256 checksum How to use checksums |
336e17726ccc50ae855685d1fe3221f0dc0b2b93d463d19a0c3417e14604cd2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|
Release files / django_restricted_fields-0.3.1-py3-none-any.whl
| Download URL | django_restricted_fields-0.3.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd40366b99e50f47b8d62aafa1053626136f8c365c0d4dff9095853409d4fd28
|
|
BLAKE2b-256 checksum How to use checksums |
6b32c126760d4ed08948fae2aec7ac53e5e353ad32cf594c86994c9b51df4838
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|