Skip to main content

No project description provided

Project description

HOPE FlexFields

Test Lint codecov Documentation PyPI

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

Uploaded Source

Built Distribution

hope_flex_fields-0.5.0-py3-none-any.whl (264.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hope_flex_fields-0.5.0.tar.gz
  • Upload date:
  • Size: 551.1 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.5.0.tar.gz
Algorithm Hash digest
SHA256 0b907935ef5d4766a49e4b478f475ddfd9b9cb8ead432373275e266cb6447c06
MD5 012b31c61c91ed5533b2de3802d049c0
BLAKE2b-256 d2765e7b4b73b2ec23621f6334da4e780c0bf6eef92fddbed54985790f7bc66f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hope_flex_fields-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59e28873e74861da34757adda59df160fe56cfd68c1c0b4781ec9c2ce24fae8b
MD5 d96ca433400dbe3e83cda89ceb3914e2
BLAKE2b-256 ad6d2fe5f2e6b68e57f9859d7f16b6c52c0d387edfd637007a648d2f2e8dc7a4

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