simple extensions to Django form
Project description
ezform
simple extensions to Django forms
Usage
from ezform.fields import DateRangeField
class MyForm(Form):
range = DateRangeField()
Advanced Usage
- declare a concrete data model:
# myapp.models
from ezform.models import Date
class MySkipDate(Date):
class Meta:
abstract = False
and update DB schema:
export DJANGO_SETTINGS_MODULE=mywebapp.settings
django-admin makemigrations
django-admin migrate
- add required configuration to project settings:
# mywebapp.settings
EZFORM_SETTING = {
'SKIP_LIST': 'myapp.MySkipDate'
}
- get day counts:
import datetime
from ezform.utils import DayCount
day_count = DayCount(
datetime.date(2019, 12, 15),
datetime.date(2020, 1, 6)
).do()
Bylaws
Copyright 2016-2023 Xingeng Chen
License: Apache License 2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
ezform-2020.8.6-py3-none-any.whl
(19.9 kB
view details)
File details
Details for the file ezform-2020.8.6-py3-none-any.whl
.
File metadata
- Download URL: ezform-2020.8.6-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9051d64700a70a216824bbfb236337a0a5cdcfbd552d2be367c86dab50f33c49 |
|
MD5 | 5f0d18ecf2e77530333d6ff729a1bda8 |
|
BLAKE2b-256 | 24b74567bb0b6ec39e7a751feb5a5f6b921db69a3079b75ab4a1f63215f26bb7 |