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

Uploaded Source

Built Distribution

hope_flex_fields-0.1.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hope_flex_fields-0.1.0.tar.gz
  • Upload date:
  • Size: 20.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 b45732117e9b67468642fd6ba008ae0628f88ce98bc9ab2d352fe4dae22feb68
MD5 c2930db172efbff2687b067afdadd75b
BLAKE2b-256 4bd2c937eb931567e49ce662e4e8720c2720d66bac31524269bb8251a3bdb514

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hope_flex_fields-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c8dabeb14d14a0465a38891169ffe23e29cf6050282222bb925316572a90040
MD5 3c6c678b1f2c081db2e1136efef2c6f7
BLAKE2b-256 5e83a17cb5d42445fa403adf3574582b53eae744e8f25bb5dfed2607435788b6

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