{"id":13813820,"url":"https://github.com/roverdotcom/django-inlinecss","last_synced_at":"2025-04-12T23:43:18.425Z","repository":{"id":3897571,"uuid":"4985534","full_name":"roverdotcom/django-inlinecss","owner":"roverdotcom","description":"A Django app useful for inlining CSS (primarily for e-mails)","archived":false,"fork":false,"pushed_at":"2024-06-06T13:45:13.000Z","size":96,"stargazers_count":160,"open_issues_count":30,"forks_count":94,"subscribers_count":93,"default_branch":"master","last_synced_at":"2025-04-12T23:43:03.878Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roverdotcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-07-11T07:00:49.000Z","updated_at":"2024-08-08T13:29:32.000Z","dependencies_parsed_at":"2024-02-22T21:25:31.010Z","dependency_job_id":"c721d1d3-2a1c-4003-b074-936330818b90","html_url":"https://github.com/roverdotcom/django-inlinecss","commit_stats":{"total_commits":73,"total_committers":12,"mean_commits":6.083333333333333,"dds":0.5616438356164384,"last_synced_commit":"aca7106337cdc85a77dfbffb333ae91aaae74e14"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-inlinecss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-inlinecss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-inlinecss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-inlinecss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roverdotcom","download_url":"https://codeload.github.com/roverdotcom/django-inlinecss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647256,"owners_count":21139081,"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-08-04T04:01:31.662Z","updated_at":"2025-04-12T23:43:18.396Z","avatar_url":"https://github.com/roverdotcom.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/roverdotcom/django-inlinecss.svg?branch=master)](https://travis-ci.org/roverdotcom/django-inlinecss)\n\n## About\n\nInlining CSS is necessary for email generation and sending\nbut is currently a surprisingly large hassle.\n\nThis library aims to make it a breeze in the Django\ntemplate language.\n\n## Usage\n\n#### Step 1: Dependencies\n\n- BeautifulSoup\n- cssutils\n- Python 3.8+\n- Django 3.2+\n\n\n#### Step 2: Install django_inlinecss\n\nAdd ```django_inlinecss``` to your ```settings.py```:\n\n```python\nINSTALLED_APPS = (\n        'django.contrib.auth',\n        'django.contrib.webdesign',\n        'django.contrib.contenttypes',\n        '...',\n        '...',\n        '...',\n        'django_inlinecss')\n```\n\n#### Step 3: Use the templatetag\n\n1. Place your CSS file somewhere staticfiles can find it\n2. Create your template:\n\n```html\n{% load inlinecss %}\n{% inlinecss \"css/extra-padding.css\" %}\n    \u003chtml\u003e\n        \u003cbody\u003e\n            \u003cdiv class='lots-o-padding'\u003e\n                Something in need of styling.\n            \u003c/div\u003e\n        \u003c/body\u003e\n    \u003c/html\u003e\n{% endinlinecss %}\n```\n\n#### Step 4: Prepare to be Wowed\n\n```html\n\u003chtml\u003e\n    \u003cbody\u003e\n        \u003cdiv style=\"padding-left: 10px; padding-right: 10px; padding-top: 10px;\" class=\"lots-o-padding\"\u003e\n            Something in need of styling.\n        \u003c/div\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Acknowledgements\n\nThanks to Tanner Netterville for his efforts on [Pynliner](https://github.com/rennat/pynliner).\n\nThanks to Thomas Yip for his unit tests on the `soupselect` module. These tests\nhelped on getting the core CSS2 selectors to work.\n\n## License\n\nMIT license. See LICENSE.md for more detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Fdjango-inlinecss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froverdotcom%2Fdjango-inlinecss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Fdjango-inlinecss/lists"}