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.16

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.16
File Size Uploaded
django_userdefinedtables-0.0.16.tar.gz 47.3 kB Details

Built distribution (wheel)

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

Total release size: 78.9 kB

Release files / django_userdefinedtables-0.0.16.tar.gz

Download URL django_userdefinedtables-0.0.16.tar.gz
Size 47.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fb2a46efa51f96ed7b8a8295067e4f80f144486193e7fbd756a062f2e99ac5c1
BLAKE2b-256 checksum
How to use checksums
67e2d5bf18eadd30242b34fea80a649753f24b2ed19760c2859555f226c9084a
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.16-py3-none-any.whl

Download URL django_userdefinedtables-0.0.16-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56a125175825d1ef82c604e712cff5e1edea6be19c4b65adda599d54d9440a5c
BLAKE2b-256 checksum
How to use checksums
d9dbdde016f002dd12e7ffc5389cab47490a90d2dea006d8e28a19784e9ddf2f
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