dj-angles


Namedj-angles JSON
Version 0.12.0 PyPI version JSON
download
home_pageNone
SummaryAdd more bracket angles to Django templates </>
upload_time2024-11-12 03:05:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT 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 &lt;/&gt;</h1>
</p>

![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. `<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/e9/14/2eb699b6ab4df5681ec3c6a5ff75f655208d275d1fc21ffe222a0a18fdf6/dj_angles-0.12.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <h1 align=\"center\">dj-angles &lt;/&gt;</h1>\n</p>\n\n![PyPI](https://img.shields.io/pypi/v/dj-angles?color=blue&style=flat-square)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/dj-angles?color=blue&style=flat-square)\n![GitHub Sponsors](https://img.shields.io/github/sponsors/adamghill?color=blue&style=flat-square)\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#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  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.",
    "summary": "Add more bracket angles to Django templates </>",
    "version": "0.12.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": "",
            "digests": {
                "blake2b_256": "bc003fedcd6587491d1a45ff50b581c084dccfe256be2094539dea6705433f83",
                "md5": "01f2f02dcb104041d3e14eb8101b313b",
                "sha256": "0dc1c8837f3c09b2111e9e92c7c344596e38f5f98ec69321affc3c98df1fb384"
            },
            "downloads": -1,
            "filename": "dj_angles-0.12.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "01f2f02dcb104041d3e14eb8101b313b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 17838,
            "upload_time": "2024-11-12T03:05:52",
            "upload_time_iso_8601": "2024-11-12T03:05:52.785303Z",
            "url": "https://files.pythonhosted.org/packages/bc/00/3fedcd6587491d1a45ff50b581c084dccfe256be2094539dea6705433f83/dj_angles-0.12.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9142eb699b6ab4df5681ec3c6a5ff75f655208d275d1fc21ffe222a0a18fdf6",
                "md5": "e50f1d335a6097bb04ac73b7a4a6e73c",
                "sha256": "ee937165742294916c293cf3913f28c3ad8e0cc3f249203f7bf1f07bf9f1eff2"
            },
            "downloads": -1,
            "filename": "dj_angles-0.12.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e50f1d335a6097bb04ac73b7a4a6e73c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 68850,
            "upload_time": "2024-11-12T03:05:54",
            "upload_time_iso_8601": "2024-11-12T03:05:54.340464Z",
            "url": "https://files.pythonhosted.org/packages/e9/14/2eb699b6ab4df5681ec3c6a5ff75f655208d275d1fc21ffe222a0a18fdf6/dj_angles-0.12.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-12 03:05:54",
    "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"
}
        
Elapsed time: 4.63624s