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.0.tar.gz
.
File metadata
- Download URL: django_restricted_fields-0.3.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ec2541bd184e2f4dc6287f2d776513790e26e593487fde331fad3985b773639 |
|
MD5 | 467a819003e17113f21339f743579c7f |
|
BLAKE2b-256 | 213814343ddb31efbc365a36ee5c9de9301349f25b0a1ee752f4d0183c939f05 |
File details
Details for the file django_restricted_fields-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: django_restricted_fields-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80b3e9017fc30e53a24c53e25643a78acec7d61eebc888c7d0c9092ae0dfb093 |
|
MD5 | fa2e875d45c59ab632032651105bcec2 |
|
BLAKE2b-256 | fde3c827ed1434188fec0f7d970bb5bdc12fabaf5df993e9e594e7fd289b1e6e |