{"id":18763773,"url":"https://github.com/roverdotcom/django-staticfiles-noimport","last_synced_at":"2025-12-06T05:30:19.242Z","repository":{"id":57422186,"uuid":"218827291","full_name":"roverdotcom/django-staticfiles-noimport","owner":"roverdotcom","description":"Extensions to Django's built-in django.contrib.staticfiles to enable Docker build-time staticfiles handling","archived":false,"fork":false,"pushed_at":"2019-11-05T00:20:28.000Z","size":102,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-20T01:10:05.241Z","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/roverdotcom.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":"2019-10-31T17:56:01.000Z","updated_at":"2019-11-05T00:20:30.000Z","dependencies_parsed_at":"2022-09-06T14:22:09.335Z","dependency_job_id":null,"html_url":"https://github.com/roverdotcom/django-staticfiles-noimport","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/roverdotcom/django-staticfiles-noimport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-staticfiles-noimport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-staticfiles-noimport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-staticfiles-noimport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-staticfiles-noimport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roverdotcom","download_url":"https://codeload.github.com/roverdotcom/django-staticfiles-noimport/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fdjango-staticfiles-noimport/sbom","scorecard":{"id":785620,"data":{"date":"2025-08-11","repo":{"name":"github.com/roverdotcom/django-staticfiles-noimport","commit":"08fd8780d73d240e608ad155bd6a3802dcbeb111"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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/5 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":"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T06:01:27.627Z","repository_id":57422186,"created_at":"2025-08-23T06:01:27.627Z","updated_at":"2025-08-23T06:01:27.627Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27535805,"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-12-06T02:00:06.463Z","response_time":60,"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":"2024-11-07T18:27:24.776Z","updated_at":"2025-12-06T05:30:18.946Z","avatar_url":"https://github.com/roverdotcom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Staticfiles Noimport\n\n[![Build Status](https://travis-ci.org/roverdotcom/django-staticfiles-noimport.svg?branch=master)](https://travis-ci.org/roverdotcom/django-staticfiles-noimport)\n\ndjango-staticfiles-import exists to allow Django's\n`collectstatic` management command to run with the\nbare minimum of environment variables so it can be\nrun inside a `docker build` step such that the produced\ncontainer is self-contained.\n\nThis approach allows typical runtime initialization to\nverify all required runtime environment variables are\ndefined and provides an alternative entrypoint for just\nthe `collectstatic` and `findstatic` commands.\n\nSpecifically, this project allows for Django apps\nwith `static/` directories that expect you to use the\nenabled-by-default `AppDirectoriesFinder`.\n\n## Requirements \u0026 Constraints\n\nUtilizing this package requires accepting a handful of\nconstraints that are acceptable in our environment:\n\n- Static assets will be served at the same path in all\n  environments (i.e. `STATIC_URL` doesn't vary per\n  environment.)\n- Django \"apps\" may not manipulate any static\n  file handling behaviors during app initialization.\n- `INSTALLED_APPS` must reference app names as strings,\n  as opposed to importing an `AppConfig` directly.\n\n## Setup\n\n1. Ensure you have an `os.environ`-agnostic settings module.\n   - This may be achieved by creating a simple `settings/apps.py` module that is imported from your primary settings with glob syntax like: `from .apps import *` and a `settings/static.py` that imports it as well.\n   - Somewhere in that settings chain you must define `SECRET_KEY` which is the one required non-staticfiles related setting.\n2. Use the provided `staticfiles_noimport.finders.AppDirectoriesNoImportFinder` in your `STATICFILES_FINDERS` settings. (See included example.)\n3. Use `collectstatic` and `findstatic` directly without using the typical `manage.py` entrypoint. You'll need to inject your static-specific settings (e.g., `DJANGO_SETTINGS_MODULE=settings.static`) for things to work as expected.\n\n## Example Usage\n\n```python\n# settings/apps.py\nINSTALLED_APPS = (\n    \"django.contrib.auth\",\n    \"django.contrib.contenttypes\",\n    \"django.contrib.admin\",\n    ...\n    ...\n    \"yourappone\",\n    \"yourapptwo\",\n)\n\n# settings/static.py\nfrom .apps import *\n\nSTATIC_ROOT = \"/static/foobar/\"\nSTATIC_URL = \"/static/foobar/\"\n\nSTATICFILES_DIRS = (\n    \"/some/resolved/path/static\",\n)\n\nSTATICFILES_FINDERS = (\n    \"django.contrib.staticfiles.finders.FileSystemFinder\",\n    \"staticfiles_noimport.finders.AppDirectoriesNoImportFinder\"\n)\n\nSTATICFILES_STORAGE = \"django.contrib.staticfiles.storage.ManifestStaticFilesStorage\"\n```\n\nRunning collectstatic:\n\n```bash\n$ DJANGO_SETTINGS_MODULE=myproject.settings.static collectstatic\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Fdjango-staticfiles-noimport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froverdotcom%2Fdjango-staticfiles-noimport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Fdjango-staticfiles-noimport/lists"}