Skip to main content
# Wrapper for [jsonfield](https://github.com/bradjasper/django-jsonfield) with predefined structurethat uses set of corresponding widgets for edit

Requires Django 1.8+

## Installation

```
pip install django-dictionaryfield
```

## Usage
Add "dictionaryfield" to installed apps in django settings file:

```python
INSTALLED_APPS = (
...
'dictionaryfield',
...
)
```

### Use as model field

```python
from collections import OrderedDict
from django.db import models

from dictionaryfield import DictionaryField


class MyModel(models.Model):
english_data = DictionaryField(
"What is the first volume and issue in which the journal published full-text English?",
fields=OrderedDict([
('volume', fields.CharField(label='Volume', required=False)),
('issue', fields.CharField(label='Issue', required=False))
])
)
```

### Use as form field

```python
from collections import OrderedDict
from django.db import models

from dictionaryfield import DictionaryFormField


class MyForm(models.Model):
sample_field = DictionaryFormField(
"Sample field label",
fields=OrderedDict([
('volume', fields.CharField(label='Volume', required=False)),
('issue', fields.CharField(label='Issue', required=False))
])
)
```

### Use with bootstrap3 template tags
Dictionary field works with django-bootstrap3. In a template your should access child fields like this:

```html
{% load bootstra3 %}

{% bootstrap_field form.sample_field.volume %}
{% bootstrap_field form.sample_field.issue %}
```

Metadata

Release files for django-dictionaryfield 1.0

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-dictionaryfield 1.0
File Size Uploaded Provenance
django-dictionaryfield-1.0.tar.gz 6.2 kB Without provenance Details

Release files / django-dictionaryfield-1.0.tar.gz

Download URL django-dictionaryfield-1.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
36be45eb69da0cf5ab5135b135c27877434ce1ef25bc065bf0190a3716eacb96
BLAKE2b-256 checksum
How to use checksums
b1d41341a163a664beaf147f3fd7a54dec5493f437adeada3fa1633a1f59a1c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Security for django-dictionaryfield 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file No provenance

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