Add more bracket angles to Django templates </>
Project description
dj-angles </>
- 📖 Complete documentation: https://dj-angles.adamghill.com/
- 📦 Package: https://pypi.org/project/dj-angles/
⭐ Features
- Use HTML-like elements in Django templates, e.g.
<dj-partial />instead of{% include 'partial.html' %} - Wraps
includetemplates in a custom element for easier debugging and targeted CSS styling - Can be sprinkled in as needed to enhance existing Django functionality
- Since it looks like HTML, syntax highlighting mostly "just works"
- Integrates with Django component libraries like django-bird
- Lets you excitedly tell your friends how neat the Shadow DOM is
- Pretend like you are writing React components, but without dealing with a JavaScript build process
💥 Example
base.html
<dj-block name='content'> <!-- {% block content %} -->
</dj-block> <!-- {% endblock content %} -->
index.html
<dj-extends parent='base.html' /> <!-- {% extends 'base.html' %} -->
<dj-block name='content'> <!-- {% block content %} -->
<dj-include template='partial.html' /> <!-- {% include 'partial.html' %} -->
<dj-verbatim> <!-- {% verbatim %} -->
This is verbatim: {% include %}
</dj-verbatim> <!-- {% endverbatim %} -->
<dj-comment> <!-- {% comment %} -->
this is a comment
</dj-comment> <!-- {% endcomment %} -->
<dj-autoescape-on> <!-- {% autoescape-on %} -->
This is escaped
</dj-autoescape-on> <!-- {% endautoescape %} -->
<dj-autoescape-off> <!-- {% autoescape off %} -->
This is not escaped
</dj-autoescape-off> <!-- {% endautoescape %} -->
<dj-csrf /> <!-- {% csrf_token %} -->
<dj-debug /> <!-- {% debug %} -->
<dj-image src='img/django.jpg' /> <!-- <img src="{% static 'img/django.jpg' %}" /> -->
<dj-css href='css/styles.css' /> <!-- <link href="{% static 'css/styles.css' %}" rel="stylesheet" /> -->
</dj-block> <!-- {% endblock content %} -->
partial.html
<div>
This is a partial: {{ now|date:"c" }}
</div>
📖 Documentation
To learn how to install and use dj-angles see the complete documentation at https://dj-angles.adamghill.com/.
✨ Inspiration
🙌 Contributors
Emmanuelle Delescolle 💻 ⚠️ 📖 |
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 dj_angles-0.13.0.tar.gz.
File metadata
- Download URL: dj_angles-0.13.0.tar.gz
- Upload date:
- Size: 75.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18773125ce73e73022b856270f40ddc3d6b3d4a2b03591d5040dd79e5123a455
|
|
| MD5 |
a5b7d233962bd3ab408cf766b8958a5a
|
|
| BLAKE2b-256 |
31f741546ca65c3c7173e2592dcc315722424836adc19033129660d21bfc748f
|
Provenance
The following attestation bundles were made for dj_angles-0.13.0.tar.gz:
Publisher:
publish.yml on adamghill/dj-angles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dj_angles-0.13.0.tar.gz -
Subject digest:
18773125ce73e73022b856270f40ddc3d6b3d4a2b03591d5040dd79e5123a455 - Sigstore transparency entry: 169801858
- Sigstore integration time:
-
Permalink:
adamghill/dj-angles@e0633aa5f2d17df5c18781d1074a3545433aea13 -
Branch / Tag:
refs/tags/0.13.0 - Owner: https://github.com/adamghill
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e0633aa5f2d17df5c18781d1074a3545433aea13 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dj_angles-0.13.0-py3-none-any.whl.
File metadata
- Download URL: dj_angles-0.13.0-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9baf99f0dbad264adea72a6de81e2f64306eeeac75913888fcf296a0a5725a0
|
|
| MD5 |
67b4bf423eb7e29b6fe244e61c36417f
|
|
| BLAKE2b-256 |
d6a731587dd2a64fc95e3d83851d8d3934b2d6d84dea8536c0ff86f619d51bae
|
Provenance
The following attestation bundles were made for dj_angles-0.13.0-py3-none-any.whl:
Publisher:
publish.yml on adamghill/dj-angles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dj_angles-0.13.0-py3-none-any.whl -
Subject digest:
e9baf99f0dbad264adea72a6de81e2f64306eeeac75913888fcf296a0a5725a0 - Sigstore transparency entry: 169801859
- Sigstore integration time:
-
Permalink:
adamghill/dj-angles@e0633aa5f2d17df5c18781d1074a3545433aea13 -
Branch / Tag:
refs/tags/0.13.0 - Owner: https://github.com/adamghill
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e0633aa5f2d17df5c18781d1074a3545433aea13 -
Trigger Event:
release
-
Statement type: