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

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.18
File Size Uploaded
django_userdefinedtables-0.0.18.tar.gz 11.4 kB Details

Built distribution (wheel)

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

Total release size: 27.3 kB

Release files / django_userdefinedtables-0.0.18.tar.gz

Download URL django_userdefinedtables-0.0.18.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f6733b6b695908328e0c9e7dbdec37fc2723c25341d29bf8cce4e08c5a1688f0
BLAKE2b-256 checksum
How to use checksums
5974a57a9e487e807ce65f2856417b2bbd3bd3a5a7a0940bab312ff5ae34dbd5
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.18-py3-none-any.whl

Download URL django_userdefinedtables-0.0.18-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d14c61d8df9e99d409451a6bedf8a69a3bf871bdb0c6e16a5da9530735c58bf
BLAKE2b-256 checksum
How to use checksums
f037db8a6ea35c6ea0022eea52f76d994d998ff9968eb78d050bb7d80b2a15f9
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