Skip to main content

No project description provided

Project description

HOPE FlexFields

Test codecov

This library provides the ability to define a set of fields and related validation rules dynamically. It has been designed as part of the HOPE project to manage user-customizable fields (FlexField). The idea is to have a central business logic repository for data import validation.

It provides four classes:

  • FieldDefinition: This represents a collection of reusable pre-configured fields
  • FlexField: Instance like representation of FieldDefinition inside a Fieldset
  • Fieldset: Group of FlexField
  • DataChecker: Compound of fieldset

From the design point of view a high level comparison with Django components could be:

  • FieldDefinition = class forms.Field
  • Fieldset = forms.Form
  • FlexField = forms.Field()
  • DataChecker = [forms.Form(),...]

... and some utilities

classDiagram
    class AbstractField
    class FieldDefinition
    class FlexField
    class Fieldset
    class DataChecker
    AbstractField <|-- FlexField
    AbstractField <|-- FieldDefinition
    Fieldset *-- FlexField 
    FlexField --> FieldDefinition
    DataChecker o-- Fieldset

Install

CSP_SCRIPT_SRC = [
    ...
    "cdnjs.cloudflare.com",
]

INSTALLED_APPS = [
    ...
    'admin_extra_buttons',
    'jsoneditor',
    'hope_flex_fields',

]

Demo Application

python manage.py migrate
python manage.py demo
python manage.py runserver

Navigate to http://localhost:8000/admin/ and login using any username/password

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

hope_flex_fields-0.2.0.tar.gz (550.5 kB view details)

Uploaded Source

Built Distribution

hope_flex_fields-0.2.0-py3-none-any.whl (263.7 kB view details)

Uploaded Python 3

File details

Details for the file hope_flex_fields-0.2.0.tar.gz.

File metadata

  • Download URL: hope_flex_fields-0.2.0.tar.gz
  • Upload date:
  • Size: 550.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.6

File hashes

Hashes for hope_flex_fields-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8bb28113e8c7a4771be1e4eacf36dd4ec45da378220bb24af3c430d7ded1ea0b
MD5 321cc7db8715e4ee696a22f5a184f186
BLAKE2b-256 26f1e731241039de6f587c2429f8017dcb487fa339e0cad54856ca6cb55f0ef3

See more details on using hashes here.

File details

Details for the file hope_flex_fields-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hope_flex_fields-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 290ca281f49938432985da39eb405bf2d5880e77847ccb2a3974dcdc01f67a73
MD5 fa8cbfac87fca96dd18e4ff7df33dab9
BLAKE2b-256 fcac72ed6ea4659a0cd0b9f3455972db0313f3c9ef792aedf8b6ebd8c1d0c36c

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