django-css-inline


Namedjango-css-inline JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/Aleksi44/django-css-inline
SummaryDjango CSS Inline
upload_time2024-01-30 10:12:10
maintainer
docs_urlNone
authorAlexis Le Baron
requires_python
licenseGPL-3.0
keywords django css inline
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            *****************
Django CSS inline
*****************

.. image:: https://img.shields.io/pypi/v/django-css-inline
    :target: https://pypi.org/project/django-css-inline/

.. image:: https://img.shields.io/pypi/pyversions/django-css-inline
    :target: https://pypi.org/project/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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Aleksi44/django-css-inline",
    "name": "django-css-inline",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django css inline",
    "author": "Alexis Le Baron",
    "author_email": "hello@snoweb.fr",
    "download_url": "https://files.pythonhosted.org/packages/48/75/e6d546fbb08f14d5057817ae87f8731b77cee231f53f34f3dcaccb681937/django_css_inline-0.0.6.tar.gz",
    "platform": "linux",
    "description": "*****************\nDjango CSS inline\n*****************\n\n.. image:: https://img.shields.io/pypi/v/django-css-inline\n    :target: https://pypi.org/project/django-css-inline/\n\n.. image:: https://img.shields.io/pypi/pyversions/django-css-inline\n    :target: https://pypi.org/project/django-css-inline/\n\n\nSimple helper for loading CSS files as inline in HTML with Django.\n\nExample :\n\n::\n\n    {% load css_inline %}\n\n    ...\n\n    <head>\n        ...\n\n        {% css_inline %}\n            <link rel=\"stylesheet\" href=\"/static/django_css_inline/test-1.css\">\n            <link rel=\"stylesheet\" href=\"/static/django_css_inline/test-2.css\">\n            <link rel=\"stylesheet\" href=\"https://static.snoweb.fr/django-css-inline/test-3.css\">\n        {% end_css_inline %}\n    </head>\n\nEvery <link> includes between {% css_inline %} and {% end_css_inline %} give this results :\n\n::\n\n    <head>\n        ...\n\n        <style type=\"text/css\">\n\n            /* test-1.css styles */\n            /* test-2.css styles */\n            /* test-3.css styles */\n\n        </style>\n    </head>\n\n\nSetup\n#####\n\nInstall with pip :\n\n``pip install django-css-inline``\n\n\nAdd django_css_inline to django apps installed :\n::\n\n    INSTALLED_APPS = [\n        ...\n        'django_css_inline',\n    ]\n\nIn settings.py, chose to enable or disable django_css_inline. For example :\n::\n\n    # Default True\n    DJANGO_CSS_INLINE_ENABLE = not DEBUG\n\nIf you use static files with Django, don't forget to collect them with :\n::\n\n    python manage.py collectstatic\n\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Django CSS Inline",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://github.com/Aleksi44/django-css-inline"
    },
    "split_keywords": [
        "django",
        "css",
        "inline"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18f02aff09088ced07fc10d06a8dafc953e547da04b97f291f84e60c6341b5fe",
                "md5": "db1bf4d87f1f6db9cfbec943ed958326",
                "sha256": "076df4ce8ced59fbfff7cc62610c1621a4effa48340b4600269e2d884bc6deed"
            },
            "downloads": -1,
            "filename": "django_css_inline-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db1bf4d87f1f6db9cfbec943ed958326",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 17396,
            "upload_time": "2024-01-30T10:12:08",
            "upload_time_iso_8601": "2024-01-30T10:12:08.573949Z",
            "url": "https://files.pythonhosted.org/packages/18/f0/2aff09088ced07fc10d06a8dafc953e547da04b97f291f84e60c6341b5fe/django_css_inline-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4875e6d546fbb08f14d5057817ae87f8731b77cee231f53f34f3dcaccb681937",
                "md5": "cd3e5daefc3333dc8327c04c5a2a93ab",
                "sha256": "eda5d421aed2af63d8938fee2afebbbf6adb9c54b84a3a9ef5a74025ff93cd56"
            },
            "downloads": -1,
            "filename": "django_css_inline-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "cd3e5daefc3333dc8327c04c5a2a93ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16207,
            "upload_time": "2024-01-30T10:12:10",
            "upload_time_iso_8601": "2024-01-30T10:12:10.428199Z",
            "url": "https://files.pythonhosted.org/packages/48/75/e6d546fbb08f14d5057817ae87f8731b77cee231f53f34f3dcaccb681937/django_css_inline-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-30 10:12:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Aleksi44",
    "github_project": "django-css-inline",
    "github_not_found": true,
    "lcname": "django-css-inline"
}
        
Elapsed time: 0.24106s