Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adamghill/dj-angles

Add more HTML to your Django templates </>
https://github.com/adamghill/dj-angles

css django django-templates html web-components

Last synced: 5 days ago
JSON representation

Add more HTML to your Django templates </>

Awesome Lists containing this project

README

        


dj-angles </>

![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)
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#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. `` 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


```

**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 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



Emmanuelle Delescolle
Emmanuelle Delescolle

💻 ⚠️ 📖