{"id":19757148,"url":"https://github.com/lyst/django-inlinify","last_synced_at":"2025-04-30T12:31:21.830Z","repository":{"id":22263928,"uuid":"25597940","full_name":"lyst/django-inlinify","owner":"lyst","description":null,"archived":false,"fork":false,"pushed_at":"2016-01-04T12:59:38.000Z","size":688,"stargazers_count":4,"open_issues_count":2,"forks_count":4,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-10-13T19:07:24.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-22T18:41:18.000Z","updated_at":"2021-07-08T17:19:24.000Z","dependencies_parsed_at":"2022-09-09T06:50:49.971Z","dependency_job_id":null,"html_url":"https://github.com/lyst/django-inlinify","commit_stats":null,"previous_names":["ssaw/django-inlinify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Fdjango-inlinify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Fdjango-inlinify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Fdjango-inlinify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyst%2Fdjango-inlinify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyst","download_url":"https://codeload.github.com/lyst/django-inlinify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224208142,"owners_count":17273721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T03:18:14.559Z","updated_at":"2024-11-12T03:18:15.138Z","avatar_url":"https://github.com/lyst.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"django-inlinify\n=========\n\nDjango app for in-lining CSS. This project was initially based on [premailer](https://github.com/peterbe/premailer).\n\nUsage\n--------------\nJust include `django_inlinify` in your `INSTALLED_APPS` and\n```python\nfrom django_inlinify.inlinify import Inlinify\n\nhtml = '\u003chtml\u003e\n        \u003chead\u003e\n        \u003ctitle\u003eTitle\u003c/title\u003e\n        \u003cstyle type=\"text/css\"\u003e\n        p * { color: blue }\n        \u003c/style\u003e\n        \u003c/head\u003e\n        \u003cbody\u003e\n        \u003ch1\u003eTitle\u003c/h1\u003e\n        \u003cp\u003e\u003cstrong\u003eText1\u003c/strong\u003e\u003c/p\u003e\n        \u003cp\u003e\u003cstrong\u003eText2\u003c/strong\u003e\u003c/p\u003e\n        \u003c/body\u003e\n        \u003c/html\u003e'\n\np = Inlinify()\np.transform(html)\n```\n\nSettings\n--------------\n\nOverride the following in your Django settings according to your needs. You can check their default values on `django_inlinify/defaults.py`\n\n```python\n# the default cache backend. Make sure it exists in `CACHES`\nDJANGO_INLINIFY_DEFAULT_CACHE_BACKEND_NAME\n\n# CSS parser cache key prefix\nDJANGO_INLINIFY_CSSPARSER_CACHE_KEY_PREFIX\n\n# CSS parser cache key TTL\nDJANGO_INLINIFY_CSSPARSER_CACHE_KEY_TTL\n\n# CSS attribute to HTML attribute mapping\nDJANGO_INLINIFY_CSS_HTML_ATTRIBUTE_MAPPING\n\n# CSS loader cache key prefix\nDJANGO_INLINIFY_CSSLOADER_CACHE_KEY_PREFIX\n\n# CSS loader cache key TTL\nDJANGO_INLINIFY_CSSLOADER_CACHE_KEY_TTL\n```\n\nRunning tests\n----\n\nThe best way to run tests is to do it using `tox` so they run in different environments, ensuring compatiblity with\ndifferent python versions\n\n```python\n# install tox if you haven't already\npip install tox\n\n# run it\ntox\n```\n\nVersion\n----\n\n0.0.16\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyst%2Fdjango-inlinify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyst%2Fdjango-inlinify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyst%2Fdjango-inlinify/lists"}