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.3.0.tar.gz (550.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hope_flex_fields-0.3.0.tar.gz
  • Upload date:
  • Size: 550.6 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.3.0.tar.gz
Algorithm Hash digest
SHA256 26f6ca71caf1f75ab3fd72088afe74c2a4891278263fb4b3a8e7321ea39a71ea
MD5 4c18317aff3ee21271c4e65851acb195
BLAKE2b-256 e35a666e07c3fe57df801db0d54163990488518bff0ab3728d8a52f4b84af8f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hope_flex_fields-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e216f01451105c00abd9ee9f1616a31c25c9cf4778634494b6b3b164eab011b
MD5 b5c82a8e3c8dcdae5b77ec50089f32dd
BLAKE2b-256 1bd0e5ec8663d0fbccb3784e1cfd7199e15f2994f30d4793dfe03deb1db9efb3

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