Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamghill/dj-angles
Adds more bracket angles to Django templates </>
https://github.com/adamghill/dj-angles
css django html web-components
Last synced: about 1 month ago
JSON representation
Adds more bracket angles to Django templates </>
- Host: GitHub
- URL: https://github.com/adamghill/dj-angles
- Owner: adamghill
- License: mit
- Created: 2024-09-01T20:25:48.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-22T15:22:18.000Z (about 2 months ago)
- Last Synced: 2024-10-01T02:41:21.842Z (about 2 months ago)
- Topics: css, django, html, web-components
- Language: Python
- Homepage: https://dj-angles.adamghill.com
- Size: 117 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
dj-angles </>
Add more bracket angles to Django templates
![PyPI](https://img.shields.io/pypi/v/dj-angles?color=blue&style=flat-square)
![PyPI - Downloads](https://img.shields.io/pypi/dm/dj-angles?color=blue&style=flat-square)
![GitHub Sponsors](https://img.shields.io/github/sponsors/adamghill?color=blue&style=flat-square)- 📖 Full documentation: https://dj-angles.adamghill.com/
- 📦 Package is on PyPI: https://pypi.org/project/dj-angles/## ⭐ Features
- Use HTML-like elements in Django templates, e.g. `` instead of `{% include 'partial.html' %}`
- Can be sprinkled in as needed and only enhances existing Django functionality
- Since it looks like HTML, syntax highlighting mostly "just works"
- Wraps included templates in a custom element for easier debugging and targeted CSS styling
- Lets you excitedly tell your friends how neat the Shadow DOM is
- Pretend like you are writing React components, but without dealing with JavaScript at all## 💥 Example
**`base.html`**
```html
```
**`index.html`**
```html
This is verbatim: {% include %}
this is a comment
This is escaped
This is not escaped
```**partial.html**
```html
This is a partial: {{ now|date:"c" }}
```## 📖 Documentation
To learn more about how to install and use `dj-angles` go to https://dj-angles.adamghill.com/.
## ✨ Inspiration
I have been interested in Django components and encapsulating functionality for a long time (see [django-unicorn](https://www.django-unicorn.com), [dlitejs](https://dlitejs.com), etc), but had never thought of using HTML directly until I looked at [Cotton](https://django-cotton.com) by [wrabit](https://github.com/wrabit). `dj-angles` takes the initial idea further to see how well it works.