Skip to main content

Django CSS inline

https://img.shields.io/pypi/v/django-css-inline https://img.shields.io/pypi/pyversions/django-css-inline

Simple helper for loading CSS files as inline in HTML with Django.

Example :

{% load css_inline %}

...

<head>
    ...

    {% css_inline %}
        <link rel="stylesheet" href="/static/django_css_inline/test-1.css">
        <link rel="stylesheet" href="/static/django_css_inline/test-2.css">
        <link rel="stylesheet" href="https://static.snoweb.fr/django-css-inline/test-3.css">
    {% end_css_inline %}
</head>

Every <link> includes between {% css_inline %} and {% end_css_inline %} give this results :

<head>
    ...

    <style type="text/css">

        /* test-1.css styles */
        /* test-2.css styles */
        /* test-3.css styles */

    </style>
</head>

Setup

Install with pip :

pip install django-css-inline

Add django_css_inline to django apps installed :

INSTALLED_APPS = [
    ...
    'django_css_inline',
]

In settings.py, chose to enable or disable django_css_inline. For example :

# Default True
DJANGO_CSS_INLINE_ENABLE = not DEBUG

If you use static files with Django, don’t forget to collect them with :

python manage.py collectstatic

Metadata

Release files for django-css-inline 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-css-inline 0.0.6
File Size Uploaded Provenance
django_css_inline-0.0.6.tar.gz 16.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-css-inline 0.0.6
File Interpreter ABI Platform
django_css_inline-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 33.6 kB

Release files / django_css_inline-0.0.6.tar.gz

Download URL django_css_inline-0.0.6.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eda5d421aed2af63d8938fee2afebbbf6adb9c54b84a3a9ef5a74025ff93cd56
BLAKE2b-256 checksum
How to use checksums
4875e6d546fbb08f14d5057817ae87f8731b77cee231f53f34f3dcaccb681937
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9

Release files / django_css_inline-0.0.6-py3-none-any.whl

Download URL django_css_inline-0.0.6-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
076df4ce8ced59fbfff7cc62610c1621a4effa48340b4600269e2d884bc6deed
BLAKE2b-256 checksum
How to use checksums
18f02aff09088ced07fc10d06a8dafc953e547da04b97f291f84e60c6341b5fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9

Security for django-css-inline 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page