Skip to main content

Generic EAV-style table creation in the user's hands

Project description

Tests passing Latest is on pypi

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_userdefinedtables-0.0.14.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_userdefinedtables-0.0.14-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file django_userdefinedtables-0.0.14.tar.gz.

File metadata

File hashes

Hashes for django_userdefinedtables-0.0.14.tar.gz
Algorithm Hash digest
SHA256 fb22a92e9bafb0137b75aa938ead596028366c362b64bcb123ef3c54d174394b
MD5 e03a35af4521f352ea47628c94c6a4d8
BLAKE2b-256 a17558bf6d939ab439b6df3bec48ac36d78e5fe5ab1922611423cc402558bd22

See more details on using hashes here.

File details

Details for the file django_userdefinedtables-0.0.14-py3-none-any.whl.

File metadata

File hashes

Hashes for django_userdefinedtables-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 cd06986861dcc1c603d7db5de151f4fe3de762394eaf32f4c0191861ad87c267
MD5 fdf5fcbe3382e1d60fd4b38af973e96e
BLAKE2b-256 1c7dcdd4501d3e8782bb468e5962af560871273df424c09b1021d9c3c9f84b57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page