{"id":31846865,"url":"https://github.com/frojd/wagtail-trash","last_synced_at":"2025-10-12T09:17:25.527Z","repository":{"id":44641826,"uuid":"305655038","full_name":"Frojd/wagtail-trash","owner":"Frojd","description":"Instead of deleting pages when pressing delete, pages will get thrown into the \"Trash Can\".","archived":false,"fork":false,"pushed_at":"2025-08-23T04:54:02.000Z","size":131,"stargazers_count":39,"open_issues_count":6,"forks_count":7,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-08-24T08:06:52.122Z","etag":null,"topics":["recycle","trash","trashcan","wagtail"],"latest_commit_sha":null,"homepage":"","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/Frojd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2020-10-20T09:22:24.000Z","updated_at":"2025-08-23T04:54:05.000Z","dependencies_parsed_at":"2023-02-10T18:00:29.288Z","dependency_job_id":"62012280-fde2-4a12-ab1b-180bb1a871ce","html_url":"https://github.com/Frojd/wagtail-trash","commit_stats":{"total_commits":129,"total_committers":6,"mean_commits":21.5,"dds":"0.49612403100775193","last_synced_commit":"4322f0735f9ffa7d506d60f1e381c1e79973425d"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Frojd/wagtail-trash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frojd%2Fwagtail-trash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frojd%2Fwagtail-trash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frojd%2Fwagtail-trash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frojd%2Fwagtail-trash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Frojd","download_url":"https://codeload.github.com/Frojd/wagtail-trash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frojd%2Fwagtail-trash/sbom","scorecard":{"id":53134,"data":{"date":"2025-08-11","repo":{"name":"github.com/Frojd/wagtail-trash","commit":"032ebcee26cf40ae2bbd34d4eb8f787f0e31b5dd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"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":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/Frojd/wagtail-trash/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/Frojd/wagtail-trash/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/Frojd/wagtail-trash/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/Frojd/wagtail-trash/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/Frojd/wagtail-trash/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/Frojd/wagtail-trash/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/Frojd/wagtail-trash/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/Frojd/wagtail-trash/main.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating python:3.13-slim to python:3.13-slim@sha256:6f79e7a10bb7d0b0a50534a70ebc78823f941fba26143ecd7e6c5dca9d7d7e8a","Warn: pipCommand not pinned by hash: Dockerfile:22","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:57","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:58","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:71","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:72","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   9 pipCommand dependencies pinned"],"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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"}}]},"last_synced_at":"2025-08-15T00:06:59.684Z","repository_id":44641826,"created_at":"2025-08-15T00:06:59.684Z","updated_at":"2025-08-15T00:06:59.684Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010968,"owners_count":26084837,"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-12T02:00:06.719Z","response_time":53,"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":["recycle","trash","trashcan","wagtail"],"created_at":"2025-10-12T09:17:23.384Z","updated_at":"2025-10-12T09:17:25.520Z","avatar_url":"https://github.com/Frojd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Run tests, lint and publish](https://github.com/Frojd/wagtail-trash/actions/workflows/main.yml/badge.svg)](https://github.com/Frojd/wagtail-trash/actions/workflows/main.yml) [![PyPI version](https://badge.fury.io/py/wagtail-trash.svg)](https://badge.fury.io/py/wagtail-trash)\n\n# wagtail trash\n\nInstead of deleting pages when pressing delete, pages will get thrown into the \"Trash Can\".\n\n\n## Install\n\n1. First install the python package:\n`pip install wagtail-trash`\n\nThis step will install both `wagtail-trash` and `wagtail-modeladmin` which is a requirement for the admin.\n\n2. Then add both `wagtail-trash` and `wagtail-modeladmin` to your `INSTALLED_APPS`:\n\n```python\nINSTALLED_APPS = [\n    # ...\n    \"wagtail_modeladmin\",\n    \"wagtail_trash\",\n]\n```\n\n3. Run migrations, et voila!\n\n\n## How it works\n\nWagtail Trash works by hooking into the Wagtail hook `before_delete_page` and overriding the delete view.\nInstead of deleting the page the page gets moved to the special \"Trash\" page. The deleted page and all descendants will get unpublished.\nFrom the trash can in Wagtail admin it's then possible to permanently delete the page or to restore the page. Restoring a page will also republish the pages that were published when getting deleted.\nIf the parent of the deleted page is either in the trash can or permanently deleted it's still possible to restore the pages by supplying an alternate parent.\n\n\n## Usage\n\n### App order\nSince Wagtail Trash uses the hook `before_delete_page` it might interfere with your applications `before_delete_page` if you have defined one that returns a status code. Make sure wagtail trash is the last hook that runs otherwise or your custom `before_delete_page` might not run since Wagtail Trash doesn't call it.\n\n```python\n# Example\nINSTALLED_APPS = [\n    \"wagtail.sites\",\n    \"wagtail\",\n    \"wagtail.contrib.forms\",\n    \"wagtail.contrib.redirects\",\n    \"wagtail_modeladmin\",\n    \"wagtail.contrib.routable_page\",\n    \"wagtail.contrib.settings\",\n    \"wagtail_trash\",  # Import here\n    ...\n]\n```\n\n### Page manager\nAlso, Wagtail Trash \"deletes\" pages by unpublishing them, so if you use a queryset that doesn't filter out unpublished pages, pages in trash can might show up. There is a manager that will fix this for you included, example:\n\n```python\nfrom wagtail.models import Page, PageManager\nfrom wagtail_trash.managers import TrashManager\n\nclass SomePage(Page):\n    objects = PageManager()  # needed, so _default_manager isn't the trash manager\n    objects_excluding_trash = TrashManager()\n\n# Now you can do this without getting any pages from the bin:\nSomePage.objects_excluding_trash.all()\n```\n\n### Exclude from sitemap\nAdd SkipSitemapIfInTrashMixin if you want trashed pages to be excluded from sitemap.\n\n```python\nfrom wagtail.models import Page\nfrom wagtail_trash.mixins import SkipSitemapIfInTrashMixin\n\nclass SomePage(SkipSitemapIfInTrashMixin, Page):\n    ...\n```\n\n### Permissions\nIf you remove a page under a restricted area, this page will be moved and therefore get new permissions. A user might go from not being allowed to see pages under e.g. \"Secret Page\", but when a page under this area is moved to trash can, the permissions from \"Secret Page\" are gone so now the user will see it in the trash can.\nThis is a solvable issue and will be fixed in a later version.\n\n\n## Clearing the bin regularly\n\nThere is an included managment-command called `empty_trash` that takes a required argument `--older_than_days`. To remove all items in the bin that's been there more than 30 days run this command:\n\n`./manage.py empty_trash --older_than_days=30`\n\n## Git flow\n\nThis project uses git flow, current release is in the `main` branch and the current development is in the `develop` branch.\n\n\n## License\n\nwagtail trash is released under the [MIT License](http://www.opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrojd%2Fwagtail-trash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrojd%2Fwagtail-trash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrojd%2Fwagtail-trash/lists"}