Generic EAV-style table creation in the user's hands
Project description
django_userdefinedtables
This application is intended to be used as a way for an end user to define their own database tables.
It is loosely inspired by the way SharePoint lists work.
Installation
To install django_userdefinedtables, use the following command:
pip install django_userdefinedtables
userdefinedtables
should then added to the APPS
list in the Django settings.
Use
Models
The models which are available for use are:
Organizational
- List: Akin to a table in a relational database.
- Column: Akin to a column/attribute in a relational database. The naked Column model should not be used, as it is the parent in a multi-table inheritance scheme used to simplify querying for instances of the various column models.
- Row: Akin to a row in a relational database. Manages order and membership of data entries.
- Entry: Like, Column, utilizes multi-table inheritance for simplified querying.
Data Type
- SingleLineOfTextColumn: brief text field. Corresponding value utilizes Django CharField.
- MultipleLineTextColumn: longer length field. Corresponding value utilizes Django TextField.
- ChoiceColumn: option among several user-defined choices. Supported by the Choice model, which captures the actual choices available.
- NumberColumn: A column which allows for entry of a decimal number. Supported by NumericalColumn abstract model, which Utilizes Django DecimalField.
- CurrencyColumn: defines a currency field. Set apart from the NumberColumn in order to support formatting, but is otherwise identical. NOTE: This is possibly unnecessarily redundant to NumberColumn and may be removed in the future.
- DateTimeColumn: defines a datetime field. Corresponding value utilizes Django DateTimeField.
- BinaryColumnEntry: defines a binary field. Corresponding value utilizes Django BooleanField.
- PictureColumn: defines a picture field. Corresponding value utilizes Django ImageField.
- LookupColumn: defines a way for end users to specify a reference to a value in another column. Utilizes several foreign key relationships.
- URLColumn: defines a url field. Corresponding value utilizes Django URLField.
Instance/Entry
Generally, these entries are self-explanatory, given an understanding of the Data Type models.
- SingleLineOfTextColumnEntry
- MultipleLineTextColumnEntry
- ChoiceEntry
- NumberEntry
- CurrencyEntry
- DateTimeColumnEntry
- BinaryColumnEntry
- LookupColumnEntry
- URLColumnEntry
Example
Please see the example page to see how this package can be used.
Active Development & Contribution
This project is still in a nascent stage and is volatile to a degree. Contribution by other members of the community is welcome, whether in the form of pull requests or ideas.
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
Hashes for django_userdefinedtables-0.0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8474633688b89d5c5b6f05e703b878e57a18043ddabd1631f30147f950434073 |
|
MD5 | cc347c9657826dd44375bba89ba91650 |
|
BLAKE2b-256 | 48ce90773e7e7711cd1e4a849f5edb5d1bff7ae9a5c90c71aef2f22111c32a60 |
Hashes for django_userdefinedtables-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0f32559b733b9fdf277b4debda866a5f701256b543e9e069a9d889daabd61b6 |
|
MD5 | be1ff1bbf7999260d1ee8c80f65e3c09 |
|
BLAKE2b-256 | 34848481b5f7c80959cf8dbfe77cc66fb4df52511d87127aa29f542a2ba7ce2f |