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

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.20
File Size Uploaded
django_userdefinedtables-0.0.20.tar.gz 12.7 kB Details

Built distribution (wheel)

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

Total release size: 30.2 kB

Release files / django_userdefinedtables-0.0.20.tar.gz

Download URL django_userdefinedtables-0.0.20.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b2b3d6dd29e7ffa95b14f5df9250bba902f096e446c9406845c420d4fa6da20f
BLAKE2b-256 checksum
How to use checksums
d7c835bd6e3710ec54131f969dcd25b9ce7d258ddecc14d4de6ada822c922441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL django_userdefinedtables-0.0.20-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b3ed99f28faae6310576b852411760c2d787f3ccd0b1e255f22a61557a7809f
BLAKE2b-256 checksum
How to use checksums
4e3506da92b2cfc7ccd3883e1ddb6948cea73a90dc4ced09fa52e3e9e0287f43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15
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