Skip to main content

Include JavaScript/CSS libraries with readable template tags

Project description

Description

Django-Any-JS helps you at including any combination of JavaScript/CSS URLs in your site, with readable settings and template tags.

Usage

In your settings:

INSTALLED_APPS = [
    ...,
    "django_any_js",
    ...,
]
ANY_JS = {
    "DataTables": {
        "js_url": "/javascript/jquery-datatables/dataTables.bootstrap4.min.js",
        "css_url": "/javascript/jquery-datatables/css/dataTables.bootstrap4.min.css",
    }
}

In your template:

{% load any_js %}
{% include_js "DataTables" %}
{% include_css "DataTables" %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-any-js-1.1.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

django_any_js-1.1-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page