Skip to main content

Tests passing Latest is on pypi

django_userdefinedtables

A Django application that enables end users to dynamically create and manage their own database tables through a web interface. This package provides an Entity-Attribute-Value (EAV) style framework that allows users to define custom data structures without requiring code changes or database migrations.

Loosely inspired by SharePoint lists, django_userdefinedtables gives your application the flexibility of user-defined schemas while maintaining the power and type safety of Django's ORM.

Key Features

  • Dynamic table creation: Users can create their own "Lists" (tables) without developer intervention
  • Multiple column types: Support for text, numbers, currency, dates, binary, images, URLs, choices, and lookups
  • Type safety: Each column type has validation and appropriate Django field types
  • Easy integration: Simple Django app that works with your existing models
  • Admin interface: Full Django admin integration out of the box

Installation

Install the package from PyPI:

pip install django_userdefinedtables

Add userdefinedtables to your INSTALLED_APPS in Django settings:

INSTALLED_APPS = [
    ...
    'userdefinedtables',
    ...
]

Run migrations:

python manage.py migrate userdefinedtables

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 with $ formatting. Otherwise identical to NumberColumn.
  • DateTimeColumn: defines a datetime field. Corresponding value utilizes Django DateTimeField.
  • BinaryColumn: 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 a complete working application demonstrating this package's features.

Contributing

This project is under active development and welcomes contributions from the community! Whether you want to:

  • Report bugs or request features
  • Improve documentation
  • Submit pull requests with bug fixes or new features
  • Share ideas for improvements

Please see our Contributing Guide for details on how to get started.

Changelog

See CHANGELOG.md for a detailed history of changes to this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for django-userdefinedtables 0.0.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-userdefinedtables 0.0.19
File Size Uploaded
django_userdefinedtables-0.0.19.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-userdefinedtables 0.0.19
File Interpreter ABI Platform
django_userdefinedtables-0.0.19-py3-none-any.whl Python 3 none any Details

Total release size: 27.3 kB

Release files / django_userdefinedtables-0.0.19.tar.gz

Download URL django_userdefinedtables-0.0.19.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ebc46a8123cea8d937fb14f72e163f7c45eb1802e74221b58a72b2307f4ac2c0
BLAKE2b-256 checksum
How to use checksums
1aac0cd55bb460d6c13d4f1e8394c6006326d141a35b1009d55cdba2757c5eb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / django_userdefinedtables-0.0.19-py3-none-any.whl

Download URL django_userdefinedtables-0.0.19-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
327ded277d9c2c21da1a7e77c6403f74c2d4d89d393046d66aacaa3e6dee688b
BLAKE2b-256 checksum
How to use checksums
2f4572bef1fd4935e152b5da68ddfcc8feb79e1df308e100fb6ac2afa76673df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page