Provides date and date/time fields with restrictions for Django forms.
Project description
django-restricted-fields
Usage
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_restricted_fields-0.4.0.tar.gz.
File metadata
- Download URL: django_restricted_fields-0.4.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc8254bf85297c2ef402bcd6f0c2275048090b0cb423889c05eff74d9b9e3a81
|
|
| MD5 |
1ebbdb103422d6fd1423538755434511
|
|
| BLAKE2b-256 |
66adefc6c552db4296d914274e60e679cad5ddd7e0a83668591cb9ba15c9a941
|
File details
Details for the file django_restricted_fields-0.4.0-py3-none-any.whl.
File metadata
- Download URL: django_restricted_fields-0.4.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cc214c0d8c9addd4d0c1122ce285eb72f986eb8d67a39bf7a9bf49becadce90
|
|
| MD5 |
fda0ee97ea99b808fecfa3f50ce914d3
|
|
| BLAKE2b-256 |
230b213ed2e1ec36723c337f6cd023e4214eac3b0af887526958249621b470cb
|