Skip to main content

Human friendly HStoreWidget. Continual of django-admin-hstore-widget.

Project description

django-hstore-widget

[!NOTE]
If you are new to hstore, please check django-hstore-field. The package builds on top of this to give an ergonomic implementation.

Downloads CI Pypi Badge pre-commit.ci status

FormField that properly renders HStoreField Data in django Admin based on djangoauts package and an updated fork of django-admin-hstore-widget

Requirements

  • Python 3.10 and Up ( well technically any python version from 3.6 should work )
  • Django 3.2 and Up
  • Modern browsers ( Chrome 112+, Firefox 117+, Safari 16.5+ )

Using pip:

pip install django-hstore-widget

Installation

# settings.py

INSTALLED_APPS = [
    ...,
    'django_hstore_widget',
    ...
]

Usage

# yourmodel/forms.py
from django import forms
from django_hstore_widget.forms import HStoreFormField
from .models import Yourmodel

class MyModelAdminForm(forms.ModelForm):
    my_hstore_field = HStoreFormField()

    class Meta:
       model = Yourmodel

# yourmodel/admin.py
from django.contrib import admin
from .models import Yourmodel
from .forms import MyModelAdminForm


@admin.register(Yourmodel)
class YourmodelAdmin(admin.ModelAdmin):
    form = MyModelAdminForm

Result

Rendered result

Comparison

Vs JSONB

Feature HStoreField JSONField
Requires PostgreSQL extension
Flat key–value support
Nested structure support
Supports non-string values
Simple key-value admin UI
Easy validation
Advanced JSON queries
Powerful containment queries
Smaller storage footprint
Suitable for metadata fields
Suitable for structured documents

Download files

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

Source Distribution

django_hstore_widget-0.0.25.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

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

django_hstore_widget-0.0.25-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file django_hstore_widget-0.0.25.tar.gz.

File metadata

  • Download URL: django_hstore_widget-0.0.25.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_hstore_widget-0.0.25.tar.gz
Algorithm Hash digest
SHA256 25c8ca3eda89d64abdd608c327f68a6a70f0c5e4d98454dca88acd0bf9068018
MD5 d236407e463ce855009ceaeb46645fd2
BLAKE2b-256 5b913aa59e174f89138caa14353f04cd6a1c28af96396cfa6682194bda8a661c

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_hstore_widget-0.0.25.tar.gz:

Publisher: CI.yml on baseplate-admin/django-hstore-widget

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_hstore_widget-0.0.25-py3-none-any.whl.

File metadata

File hashes

Hashes for django_hstore_widget-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 ce30d6dfe4f517e66de07acef19d73af79eabae21166c5364d3659d1eb443be2
MD5 6c12547b8eaab1138ff05bee50a7ebfd
BLAKE2b-256 fe6011a64a4733cb9f0960d1d6bcacf3cf0ce742a382fb7782fc769af83b301a

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_hstore_widget-0.0.25-py3-none-any.whl:

Publisher: CI.yml on baseplate-admin/django-hstore-widget

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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