Name | dj-angles JSON |
Version |
0.14.0
JSON |
| download |
home_page | None |
Summary | Add more bracket angles to Django templates </> |
upload_time | 2025-02-13 03:53:04 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2024 Adam Hill
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
brackets
django
html
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<h1 align="center">dj-angles </></h1>
</p>



[](#contributors-)
- 📖 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 `include` templates 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](https://django-bird.readthedocs.io)
- 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**
```html
<dj-block name='content'> <!-- {% block content %} -->
</dj-block> <!-- {% endblock content %} -->
```
**index.html**
```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**
```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
- [Web Components](https://web.dev/learn/html/template)
- [Cotton](https://django-cotton.com) by [wrabit](https://github.com/wrabit)
## 🙌 Contributors
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://www.levit.be"><img src="https://avatars.githubusercontent.com/u/1215070?v=4?s=100" width="100px;" alt="Emmanuelle Delescolle"/><br /><sub><b>Emmanuelle Delescolle</b></sub></a><br /><a href="https://github.com/adamghill/dj-angles/commits?author=nanuxbe" title="Code">💻</a> <a href="https://github.com/adamghill/dj-angles/commits?author=nanuxbe" title="Tests">⚠️</a> <a href="https://github.com/adamghill/dj-angles/commits?author=nanuxbe" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
Raw data
{
"_id": null,
"home_page": null,
"name": "dj-angles",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "brackets, django, html",
"author": null,
"author_email": "Adam Hill <adam@adamghill.com>",
"download_url": "https://files.pythonhosted.org/packages/1d/89/081c287ba078013812d0e04971b2afc3f996ba06d262c547f5e1ccee3fdb/dj_angles-0.14.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <h1 align=\"center\">dj-angles </></h1>\n</p>\n\n\n\n\n[](#contributors-)\n\n- \ud83d\udcd6 Complete documentation: https://dj-angles.adamghill.com/\n- \ud83d\udce6 Package: https://pypi.org/project/dj-angles/\n\n## \u2b50 Features\n\n- Use HTML-like elements in Django templates, e.g. `<dj-partial />` instead of `{% include 'partial.html' %}`\n- Wraps `include` templates in a custom element for easier debugging and targeted CSS styling\n- Can be sprinkled in as needed to enhance existing Django functionality\n- Since it looks like HTML, syntax highlighting mostly \"just works\"\n- Integrates with Django component libraries like [django-bird](https://django-bird.readthedocs.io)\n- Lets you excitedly tell your friends how neat the Shadow DOM is\n- Pretend like you are writing React components, but without dealing with a JavaScript build process\n\n## \ud83d\udca5 Example\n\n**base.html**\n\n```html\n<dj-block name='content'> <!-- {% block content %} -->\n</dj-block> <!-- {% endblock content %} -->\n```\n\n**index.html**\n\n```html\n<dj-extends parent='base.html' /> <!-- {% extends 'base.html' %} -->\n\n<dj-block name='content'> <!-- {% block content %} -->\n <dj-include template='partial.html' /> <!-- {% include 'partial.html' %} -->\n\n <dj-verbatim> <!-- {% verbatim %} -->\n This is verbatim: {% include %}\n </dj-verbatim> <!-- {% endverbatim %} -->\n\n <dj-comment> <!-- {% comment %} -->\n this is a comment\n </dj-comment> <!-- {% endcomment %} -->\n\n <dj-autoescape-on> <!-- {% autoescape-on %} -->\n This is escaped\n </dj-autoescape-on> <!-- {% endautoescape %} -->\n\n <dj-autoescape-off> <!-- {% autoescape off %} -->\n This is not escaped\n </dj-autoescape-off> <!-- {% endautoescape %} -->\n\n <dj-csrf /> <!-- {% csrf_token %} -->\n \n <dj-debug /> <!-- {% debug %} -->\n\n <dj-image src='img/django.jpg' /> <!-- <img src=\"{% static 'img/django.jpg' %}\" /> -->\n <dj-css href='css/styles.css' /> <!-- <link href=\"{% static 'css/styles.css' %}\" rel=\"stylesheet\" /> -->\n</dj-block> <!-- {% endblock content %} -->\n```\n\n**partial.html**\n\n```html\n<div>\n This is a partial: {{ now|date:\"c\" }}\n</div>\n```\n\n## \ud83d\udcd6 Documentation\n\nTo learn how to install and use `dj-angles` see the complete documentation at https://dj-angles.adamghill.com/.\n\n## \u2728 Inspiration\n\n- [Web Components](https://web.dev/learn/html/template)\n- [Cotton](https://django-cotton.com) by [wrabit](https://github.com/wrabit)\n\n## \ud83d\ude4c Contributors\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://www.levit.be\"><img src=\"https://avatars.githubusercontent.com/u/1215070?v=4?s=100\" width=\"100px;\" alt=\"Emmanuelle Delescolle\"/><br /><sub><b>Emmanuelle Delescolle</b></sub></a><br /><a href=\"https://github.com/adamghill/dj-angles/commits?author=nanuxbe\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/adamghill/dj-angles/commits?author=nanuxbe\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"https://github.com/adamghill/dj-angles/commits?author=nanuxbe\" title=\"Documentation\">\ud83d\udcd6</a></td>\n </tr>\n </tbody>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024 Adam Hill\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Add more bracket angles to Django templates </>",
"version": "0.14.0",
"project_urls": {
"Changelog": "https://dj-angles.adamghill.com/en/latest/changelog.html",
"Documentation": "https://dj-angles.adamghill.com",
"Homepage": "https://dj-angles.adamghill.com",
"Issues": "https://github.com/adamghill/dj-angles/discussions",
"Repository": "https://github.com/adamghill/dj-angles.git"
},
"split_keywords": [
"brackets",
" django",
" html"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d94a713102c6470eadaf604348007a706f63d95a9087964fa3150a3d6dce2755",
"md5": "3079fc34e0292554802eb513c46be19c",
"sha256": "995b9c5e5698210ed95c2b0aea10d4caa1daea9f89e893b9568315f584c686f9"
},
"downloads": -1,
"filename": "dj_angles-0.14.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3079fc34e0292554802eb513c46be19c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 26438,
"upload_time": "2025-02-13T03:53:02",
"upload_time_iso_8601": "2025-02-13T03:53:02.617970Z",
"url": "https://files.pythonhosted.org/packages/d9/4a/713102c6470eadaf604348007a706f63d95a9087964fa3150a3d6dce2755/dj_angles-0.14.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1d89081c287ba078013812d0e04971b2afc3f996ba06d262c547f5e1ccee3fdb",
"md5": "a2bc898165d3e39ac29608633e056460",
"sha256": "805e3faef5c328ef5e3abc7b1bdd3f9f22a12d2ddd54dbf15117f891e98743e2"
},
"downloads": -1,
"filename": "dj_angles-0.14.0.tar.gz",
"has_sig": false,
"md5_digest": "a2bc898165d3e39ac29608633e056460",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 78392,
"upload_time": "2025-02-13T03:53:04",
"upload_time_iso_8601": "2025-02-13T03:53:04.841994Z",
"url": "https://files.pythonhosted.org/packages/1d/89/081c287ba078013812d0e04971b2afc3f996ba06d262c547f5e1ccee3fdb/dj_angles-0.14.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-13 03:53:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adamghill",
"github_project": "dj-angles",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "dj-angles"
}