django-html-utils


Namedjango-html-utils JSON
Version 0.2.7 PyPI version JSON
download
home_pageNone
SummaryHTML utils app for django.
upload_time2025-07-23 08:21:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords django bootstrap jquery select2 fontawesome
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-html-utils app

HTML utils app for django.

![Linting & Tests](https://github.com/jnphilipp/django-html-utils/actions/workflows/tests.yml/badge.svg)
[![pypi Version](https://img.shields.io/pypi/v/django-html-utils.svg?logo=pypi&logoColor=white)](https://pypi.org/project/django-html-utils/)


## Included versions

* [Bootstrap](https://github.com/twbs/bootstrap) (bundle): 5.3.7
* [Font-Awesome](https://github.com/FortAwesome/Font-Awesome): 7.0.0
* [jQuery](https://github.com/jquery/jquery): 3.7.1
* [jQuery UI](https://github.com/jquery/jquery-ui): 1.14.1
* [Select2](https://github.com/select2/select2): 4.0.13


## Usage

### Basics

Load with `{% load django_html_utils %}` and include CSS/JS with:

```html
<head>
  {% django_html_utils_css %}
  {% django_html_utils_js %}
</head>
```


### Font-Awesome

To add a Font-Awesome icon use `{% fa "icon-name" %}`. Additional options are `tag`, for the tag to use, defaults to `span` and `icon_type`, for the icon type, defaults to `solid`.

For example:

```html
{% fa "upload" %}
```

resolves to:
```html
<span class="fa-solid fa-upload"></span>
```


### iFrame modal

Simple modal with an iFrame, designed for usage with forms.

Add modal with `{% iframe_form_modal %}`, with options:
* **iframe_min_height**: set minimum height of iframe, defaults to None
* **iframe_max_height**: set maximum height of iframe, defaults to None
* **static_backdrop**: if the backdrop of the model should be static, defaults to `True`
* **submit_button_text**: the text of the submit button, when `None` no text will be displayed, defaults to `None`
* **fa_icon_name**: the Font-Awesome icon name on the submit button
* **fa_tag**: the Font-Awesome tag to use, defaults to `span`
* **fa_icon_type**: the icon type, defaults to `solid`

Open link with:
```html
<a href="{% url SOME_FORM %}" title="{% trans "Modal title" %}" data-bs-toggle="modal" data-bs-target="#iframeFormModal">open modal form</a>
```

The URL will be loaded in the iFrame and the title will be set as the modal title.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-html-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "django, bootstrap, jquery, select2, fontawesome",
    "author": null,
    "author_email": "\"J. Nathanael Philipp\" <nathanael@philipp.land>",
    "download_url": "https://files.pythonhosted.org/packages/58/e1/1aa57b3c9a23042ddb9b572434abd9f4c11652d41b692866b2147476a580/django_html_utils-0.2.7.tar.gz",
    "platform": null,
    "description": "# django-html-utils app\n\nHTML utils app for django.\n\n![Linting & Tests](https://github.com/jnphilipp/django-html-utils/actions/workflows/tests.yml/badge.svg)\n[![pypi Version](https://img.shields.io/pypi/v/django-html-utils.svg?logo=pypi&logoColor=white)](https://pypi.org/project/django-html-utils/)\n\n\n## Included versions\n\n* [Bootstrap](https://github.com/twbs/bootstrap) (bundle): 5.3.7\n* [Font-Awesome](https://github.com/FortAwesome/Font-Awesome): 7.0.0\n* [jQuery](https://github.com/jquery/jquery): 3.7.1\n* [jQuery UI](https://github.com/jquery/jquery-ui): 1.14.1\n* [Select2](https://github.com/select2/select2): 4.0.13\n\n\n## Usage\n\n### Basics\n\nLoad with `{% load django_html_utils %}` and include CSS/JS with:\n\n```html\n<head>\n  {% django_html_utils_css %}\n  {% django_html_utils_js %}\n</head>\n```\n\n\n### Font-Awesome\n\nTo add a Font-Awesome icon use `{% fa \"icon-name\" %}`. Additional options are `tag`, for the tag to use, defaults to `span` and `icon_type`, for the icon type, defaults to `solid`.\n\nFor example:\n\n```html\n{% fa \"upload\" %}\n```\n\nresolves to:\n```html\n<span class=\"fa-solid fa-upload\"></span>\n```\n\n\n### iFrame modal\n\nSimple modal with an iFrame, designed for usage with forms.\n\nAdd modal with `{% iframe_form_modal %}`, with options:\n* **iframe_min_height**: set minimum height of iframe, defaults to None\n* **iframe_max_height**: set maximum height of iframe, defaults to None\n* **static_backdrop**: if the backdrop of the model should be static, defaults to `True`\n* **submit_button_text**: the text of the submit button, when `None` no text will be displayed, defaults to `None`\n* **fa_icon_name**: the Font-Awesome icon name on the submit button\n* **fa_tag**: the Font-Awesome tag to use, defaults to `span`\n* **fa_icon_type**: the icon type, defaults to `solid`\n\nOpen link with:\n```html\n<a href=\"{% url SOME_FORM %}\" title=\"{% trans \"Modal title\" %}\" data-bs-toggle=\"modal\" data-bs-target=\"#iframeFormModal\">open modal form</a>\n```\n\nThe URL will be loaded in the iFrame and the title will be set as the modal title.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "HTML utils app for django.",
    "version": "0.2.7",
    "project_urls": {
        "Bug Tracker": "http://github.com/jnphilipp/django-html-utils/issues",
        "Homepage": "http://github.com/jnphilipp/django-html-utils"
    },
    "split_keywords": [
        "django",
        " bootstrap",
        " jquery",
        " select2",
        " fontawesome"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "91d3c29603f7ea0206ce9679b407f089147d7bbabae4938d03d3f0fe905b4368",
                "md5": "3c4f78bd864f3fba0c3f963a5de2e434",
                "sha256": "22d7a8b074446987f3ce3825b22cf0b8c93bbe7a065cf66df052f2d8e585ec67"
            },
            "downloads": -1,
            "filename": "django_html_utils-0.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3c4f78bd864f3fba0c3f963a5de2e434",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 792033,
            "upload_time": "2025-07-23T08:21:30",
            "upload_time_iso_8601": "2025-07-23T08:21:30.787248Z",
            "url": "https://files.pythonhosted.org/packages/91/d3/c29603f7ea0206ce9679b407f089147d7bbabae4938d03d3f0fe905b4368/django_html_utils-0.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "58e11aa57b3c9a23042ddb9b572434abd9f4c11652d41b692866b2147476a580",
                "md5": "244227765a92f63ba58b146a0474682b",
                "sha256": "d248ac7858a99829cb3ae9edfe881791c3f79546a174b9c0c7a608a4fce7b5f4"
            },
            "downloads": -1,
            "filename": "django_html_utils-0.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "244227765a92f63ba58b146a0474682b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 745486,
            "upload_time": "2025-07-23T08:21:32",
            "upload_time_iso_8601": "2025-07-23T08:21:32.182525Z",
            "url": "https://files.pythonhosted.org/packages/58/e1/1aa57b3c9a23042ddb9b572434abd9f4c11652d41b692866b2147476a580/django_html_utils-0.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-23 08:21:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jnphilipp",
    "github_project": "django-html-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-html-utils"
}
        
Elapsed time: 0.99275s