Skip to main content

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

  1. 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
  1. add required configuration to project settings:
# mywebapp.settings
EZFORM_SETTING = {
    'SKIP_LIST': 'myapp.MySkipDate'
}
  1. 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)

Uploaded Python 3

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

Hashes for ezform-2020.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9051d64700a70a216824bbfb236337a0a5cdcfbd552d2be367c86dab50f33c49
MD5 5f0d18ecf2e77530333d6ff729a1bda8
BLAKE2b-256 24b74567bb0b6ec39e7a751feb5a5f6b921db69a3079b75ab4a1f63215f26bb7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page