Djld
Structured data with Django
Installation
pip install djld
Configuration
Add djld to your INSTALLED_APPS in settings.py, you can specify the folder containing your structured data overriding the LD_JSON_PATH variable
Usage
To render structured data in your templates you need the structured_data template tag
{% load djld %}
{% structured_data 'mydata.json' %}
You can use Django template sintax in your json files, and pass a context to the template tag
render(request, 'myapp/index.html', {
'user_data' : {
'url' : 'https://lotrek.it',
'name' : 'Human Before Digital'
}
})
{% load djld %}
{% structured_data 'mydata.json' user_data %}
You can also render a structured data from a dictionary, without using templates
render(request, 'myapp/index.html', {
'user_data' : {
'url' : 'https://lotrek.it',
'name' : 'Human Before Digital'
}
})
{% load djld %}
{% structured_data user_data %}
Run tests
$ pip install -r requirements-dev.txt
$ make test
Metadata
Release files for djld 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| djld-1.0.2.tar.gz | 3.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| djld-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / djld-1.0.2.tar.gz
| Download URL | djld-1.0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c53c97612f701a39ac80e544d65e114cf112b30c168c41d9420e7750ce20c7c
|
|
BLAKE2b-256 checksum How to use checksums |
d43089f3ad93427a4a4d2bf2ccd434da2205d0fdc8f5bd4c565ef8e088443539
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/18.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.0
|
Release files / djld-1.0.2-py3-none-any.whl
| Download URL | djld-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1060bc8826f0960523be4949ca6718156d9268d0dd2c2fc8b3eee08d90262d7
|
|
BLAKE2b-256 checksum How to use checksums |
515ff98b67398ad09c6f58ef23dca10d533e36092f845d83214f9e3480174017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/18.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.0
|
Security for djld 1.0.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.