{"id":31773723,"url":"https://github.com/distpub/django-postcss-modules","last_synced_at":"2025-10-10T04:28:16.286Z","repository":{"id":57421299,"uuid":"341850901","full_name":"DistPub/django-postcss-modules","owner":"DistPub","description":"Bring `postcss-modules` to your django project, transpiling static .cssm files on the fly, without NodeJS require!","archived":false,"fork":false,"pushed_at":"2021-02-25T10:02:46.000Z","size":336,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-02T10:37:17.531Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DistPub.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":"2021-02-24T09:44:58.000Z","updated_at":"2021-02-27T00:25:56.000Z","dependencies_parsed_at":"2022-09-01T04:52:18.270Z","dependency_job_id":null,"html_url":"https://github.com/DistPub/django-postcss-modules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DistPub/django-postcss-modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-postcss-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-postcss-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-postcss-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-postcss-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DistPub","download_url":"https://codeload.github.com/DistPub/django-postcss-modules/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-postcss-modules/sbom","scorecard":{"id":41070,"data":{"date":"2025-08-11","repo":{"name":"github.com/DistPub/django-postcss-modules","commit":"a2f3f6c9fe4b5aa180738691a9049ecb848d2fe9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2021-9 / GHSA-fvgf-6h6h-3322","Warn: Project is vulnerable to: PYSEC-2021-99 / GHSA-p99v-5w3c-jqq9","Warn: Project is vulnerable to: PYSEC-2021-8 / GHSA-qm57-vhq3-3fwf","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2021-7 / GHSA-rxjp-mfm9-w4wr","Warn: Project is vulnerable to: PYSEC-2021-439 / GHSA-v6rh-hp5x-86rv","Warn: Project is vulnerable to: PYSEC-2021-6 / GHSA-xgxc-v2qg-chmh","Warn: Project is vulnerable to: PYSEC-2021-109 / GHSA-xpfp-f569-q3p2"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T21:33:31.370Z","repository_id":57421299,"created_at":"2025-08-14T21:33:31.370Z","updated_at":"2025-08-14T21:33:31.370Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002687,"owners_count":26083442,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-10T04:28:14.722Z","updated_at":"2025-10-10T04:28:16.279Z","avatar_url":"https://github.com/DistPub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-postcss-modules\nBring `postcss-modules` to your django project, transpiling static .cssm files on the fly, without NodeJS require!\n\n# Install\n\n`pip install django-postcss-modules`\n\n# Static files transpiling config\n\n1. Add `postcss_modules` to your django `INSTALLED_APPS`\n1. Add `postcss_modules.middlewares.PostCSSModulesMiddleware` to your django `MIDDLEWARE`\n    \u003enote the order\n    ```\n    [\n    ...\n    'postcss_modules.middlewares.PostCSSModulesMiddleware',\n    'whitenoise.middleware.WhiteNoiseMiddleware',\n    ... \n    ]\n    ```\n1. Config django `STATICFILES_STORAGE = 'postcss_modules.storage.PostCSSModulesStorage'`\n\n# Global Options\n\nDefault options is:\n\n```python\n{\n    'polyfill': 'postcss-modules-v8-polyfill.js',\n    'transpiler': 'npm/postcss-modules-standalone@1.0.1/index.bundle.min.js',\n    'setup': 'postcss-modules-setup.js',\n    'extensions': ['.cssm'],\n    'mimetypes': {\n        '.cssm': 'text/css'\n    },\n    'max_time': 3 # transpiling max wait time, in second\n}\n```\n\nYou can customize by provide `POSTCSS_MODULES` in your django settings, for example, custom max time:\n\n```\nPOSTCSS_MODULES = {\n    'max_time': 30\n}\n```\n\n# Template Support\n\nSometimes transpiling in your template file is more make sense than static file, \nyou can use `postcssmodules` tag to do that.\n\n```\n{% load static postcss_modules %}\n...\n\u003cstyle id=\"indexStyles\"\u003e\n{% postcssmodules %}\n:global .page {\n  padding: 20px;\n}\n\n@value hi from '{% static \"myapp/css/consts.cssm\" %}';\n\n.title {\n  composes: title from \"{% static \"myapp/css/mixins.cssm\" %}\";\n  color: green;\n}\n\n.article {\n  font-size: 16px;\n  color: hi;\n}\n{% endpostcssmodules %}\n\u003c/style\u003e\n...\n\u003cscript\u003e\n  const _styles = document.querySelector('#indexStyles').sheet\n  const styles = JSON.parse(_styles.cssRules[_styles.cssRules.length - 1].style.getPropertyValue('--json'));\n  element.innerHTML = '\u003cdiv class=\"' + styles.title + '\"\u003e';\n\u003c/script\u003e\n...\n```\n\nTemplate tag also support use custom transpiling option, for example:\n\n```\n{% postcssmodules max_time=30 %}\n.title {\n  composes: title from \"{% static \"myapp/css/mixins.cssm\" %}\";\n  color: green;\n}\n{% endpostcssmodules %}\n```\n    \n# FAQ\n\n1. Static file not get transpiled\n    \u003eif you use django `runserver` command to run server and the setting `DEBUG=True`, please add `--nostatic` option to command\n\n1. I want use other storage\n    \u003eyou should write your own storage to inherit `PostCSSModulesStorage`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistpub%2Fdjango-postcss-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistpub%2Fdjango-postcss-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistpub%2Fdjango-postcss-modules/lists"}