Human friendly HStoreWidget. Continual of django-admin-hstore-widget.
Project description
django-hstore-widget
[!NOTE]
If you are new tohstore, please check django-hstore-field. The package builds on top of this to give an ergonomic implementation.
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
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 | ❌ | ✅ |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c8ca3eda89d64abdd608c327f68a6a70f0c5e4d98454dca88acd0bf9068018
|
|
| MD5 |
d236407e463ce855009ceaeb46645fd2
|
|
| BLAKE2b-256 |
5b913aa59e174f89138caa14353f04cd6a1c28af96396cfa6682194bda8a661c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_hstore_widget-0.0.25.tar.gz -
Subject digest:
25c8ca3eda89d64abdd608c327f68a6a70f0c5e4d98454dca88acd0bf9068018 - Sigstore transparency entry: 1017915893
- Sigstore integration time:
-
Permalink:
baseplate-admin/django-hstore-widget@44fbc085c2e906013aa46550ed97737de08ca91c -
Branch / Tag:
refs/tags/0.0.25 - Owner: https://github.com/baseplate-admin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@44fbc085c2e906013aa46550ed97737de08ca91c -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_hstore_widget-0.0.25-py3-none-any.whl.
File metadata
- Download URL: django_hstore_widget-0.0.25-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce30d6dfe4f517e66de07acef19d73af79eabae21166c5364d3659d1eb443be2
|
|
| MD5 |
6c12547b8eaab1138ff05bee50a7ebfd
|
|
| BLAKE2b-256 |
fe6011a64a4733cb9f0960d1d6bcacf3cf0ce742a382fb7782fc769af83b301a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_hstore_widget-0.0.25-py3-none-any.whl -
Subject digest:
ce30d6dfe4f517e66de07acef19d73af79eabae21166c5364d3659d1eb443be2 - Sigstore transparency entry: 1017915896
- Sigstore integration time:
-
Permalink:
baseplate-admin/django-hstore-widget@44fbc085c2e906013aa46550ed97737de08ca91c -
Branch / Tag:
refs/tags/0.0.25 - Owner: https://github.com/baseplate-admin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@44fbc085c2e906013aa46550ed97737de08ca91c -
Trigger Event:
push
-
Statement type: