No project description provided
Project description
HOPE FlexFields
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
FieldDefinitioninside aFieldset - 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.FieldFieldset=forms.FormFlexField=forms.Field()DataChecker=[forms.Form(),...]
... and some utilities
- Automatic creation of FieldSets inspecting exiting models
- Automatic creation of XLS file matching an existing Datachecker
- Validate XLS against an existing Datachecker
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
pip install -e .
python manage.py migrate
python manage.py demo
python manage.py runserver
Demo Application with UV
uv venv
uv sync
uv run pip install -e .
uv run python manage.py migrate
uv run python manage.py demo
uv run python manage.py runserver
Navigate to http://localhost:8000/admin/ and login using any username/password
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hope_flex_fields-0.7.1.tar.gz.
File metadata
- Download URL: hope_flex_fields-0.7.1.tar.gz
- Upload date:
- Size: 640.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
159f57c875056aed06ae9f90817ceeeff76e36d067bff28f99fd4876d9c9415a
|
|
| MD5 |
03d4ec34529de1cdfb9488163eacabe6
|
|
| BLAKE2b-256 |
e8bd3f7b79ba2f2c25b4e64705a0f488219fedc9f813f7f17f21c40b0d329ce8
|
File details
Details for the file hope_flex_fields-0.7.1-py3-none-any.whl.
File metadata
- Download URL: hope_flex_fields-0.7.1-py3-none-any.whl
- Upload date:
- Size: 436.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f34b4592fe677a2c5099db9eb352181275b179150b7ab0a936f66438c7d8aac
|
|
| MD5 |
5c19302d50c5b562e49ff06b42fa59c9
|
|
| BLAKE2b-256 |
a5ef4875f8c791c2ed9d25caf7c08ee75e6e0fba35d35f37554e3f033f7b79a6
|