Skip to main content

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

Project description

django-hstore-widget-2

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

Requirements

  • Python 3.9 and Up ( well technically any python version from 3.6 should work )
  • Django 3.2 and Up

Using pip:

pip install django-hstore-widget

Installation

# settings.py

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

Usage

# yourmodel/admin.py
from django.contrib import admin
from django import forms

from django_admin_hstore_widget.forms import HStoreFormField
from models import Yourmodel

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

    class Meta:
       model = Yourmodel
       exclude = ()

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

Result

Rendered result

Project details


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.1.tar.gz (12.5 kB view hashes)

Uploaded Source

Built Distribution

django_hstore_widget-0.0.1-py3-none-any.whl (15.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page