django-neat-html
Integrate neat-html as a template backend for Django.
Examples
Installation
Using pip:
pip install django-neat-html
Configuration
Add the django_neat_html.NeatHtml template backend.
# my_project/settings.py
TEMPLATES = [
...
{
'NAME': 'neat_html',
'BACKEND': 'django_neat_html.NeatHtml',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {},
},
]
Usage
Write some components using the neat-html package.
# my_project/my_app/neats/components.py
from neat_html import Element, h
def my_page(context) -> Element:
return h("h1", "My page")
Reference them as a template in your Django views.
# my_project/my_app/views.py
from django.template.response import TemplateResponse
def my_view(request):
return TemplateResponse(request, "my_project.my_app.neats.component.my_page", {})
Metadata
Release files for django-neat-html 0.1.0
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 | |
|---|---|---|---|---|
| django_neat_html-0.1.0.tar.gz | 2.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_neat_html-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 kB
Release files / django_neat_html-0.1.0.tar.gz
| Download URL | django_neat_html-0.1.0.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29cadca82d23ae72cc890202aa86d3607aaf12aa3fffbbb1232eb0283b273166
|
|
BLAKE2b-256 checksum How to use checksums |
f568a22348c4de1681760d443919e9afd1226a54e26f094161b84c21dc47fa23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.6 Linux/6.10.13-3-MANJARO
|
Release files / django_neat_html-0.1.0-py3-none-any.whl
| Download URL | django_neat_html-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1207bca5916462385a4ed483a5c8356c7d3ddb95b77988d29a88f7948b39c856
|
|
BLAKE2b-256 checksum How to use checksums |
f4c900de2c39c37ae7600b19fafb0537424d2b94d5423d09c8127933ca6398cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.6 Linux/6.10.13-3-MANJARO
|
Security for django-neat-html 0.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.