{"id":13531876,"url":"https://github.com/cfpb/wagtail-treemodeladmin","last_synced_at":"2025-10-10T22:13:29.459Z","repository":{"id":32240798,"uuid":"132007145","full_name":"cfpb/wagtail-treemodeladmin","owner":"cfpb","description":"An extension for Wagtail's ModelAdmin for a page explorer-like navigation of Django model relationships","archived":false,"fork":false,"pushed_at":"2024-07-02T13:23:49.000Z","size":808,"stargazers_count":51,"open_issues_count":4,"forks_count":9,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-08-31T19:41:26.150Z","etag":null,"topics":["django","hacktoberfest","wagtail"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfpb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2018-05-03T14:28:49.000Z","updated_at":"2025-07-31T15:20:59.000Z","dependencies_parsed_at":"2023-11-09T23:55:20.752Z","dependency_job_id":"8259ed14-0203-4ae4-83c2-4470677f6a84","html_url":"https://github.com/cfpb/wagtail-treemodeladmin","commit_stats":{"total_commits":118,"total_committers":20,"mean_commits":5.9,"dds":0.5593220338983051,"last_synced_commit":"693dd2feedbd576184c56313dce60176d569047d"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/cfpb/wagtail-treemodeladmin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fwagtail-treemodeladmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fwagtail-treemodeladmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fwagtail-treemodeladmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fwagtail-treemodeladmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfpb","download_url":"https://codeload.github.com/cfpb/wagtail-treemodeladmin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fwagtail-treemodeladmin/sbom","scorecard":{"id":272105,"data":{"date":"2025-08-11","repo":{"name":"github.com/cfpb/wagtail-treemodeladmin","commit":"990becba9f68493899a51812ffbd55d55959141f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"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":"Code-Review","score":3,"reason":"Found 6/16 approved changesets -- score normalized to 3","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":"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":"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/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test.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":"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/release.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/cfpb/wagtail-treemodeladmin/test.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:48","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:49","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:81","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:82","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   7 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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Creative Commons Zero v1.0 Universal: 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 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-17T13:38:29.651Z","repository_id":32240798,"created_at":"2025-08-17T13:38:29.651Z","updated_at":"2025-08-17T13:38:29.651Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005464,"owners_count":26083900,"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":["django","hacktoberfest","wagtail"],"created_at":"2024-08-01T07:01:06.450Z","updated_at":"2025-10-10T22:13:29.444Z","avatar_url":"https://github.com/cfpb.png","language":"Python","funding_links":[],"categories":["Apps"],"sub_categories":["Modeladmin"],"readme":"# Wagtail-TreeModelAdmin\n\n![Build Status](https://github.com/cfpb/wagtail-treemodeladmin/workflows/test/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/cfpb/wagtail-treemodeladmin/badge.svg?branch=main)](https://coveralls.io/github/cfpb/wagtail-treemodeladmin?branch=main)\n\n![TreeModelAdmin illustration with the books and authors example below](treemodeladmin.gif)\n\nWagtail-TreeModelAdmin is an extension for Wagtail's [wagtail-modeladmin](https://github.com/wagtail-nest/wagtail-modeladmin) that allows for a page explorer-like navigation of Django model relationships within the Wagtail admin.\n\n- [Dependencies](#dependencies)\n- [Installation](#installation)\n- [Concepts](#concepts)\n- [Usage](#usage)\n    - [Quickstart](#quickstart)\n- [API](#api)\n- [Getting help](#getting-help)\n- [Getting involved](#getting-involved)\n- [Licensing](#licensing)\n- [Credits and references](#credits-and-references)\n\n## Dependencies\n\n- Python 3.8+\n- Django 3.2 (LTS), 4.1 (current)\n- Wagtail 5.1+\n- [wagtail-modeladmin](https://github.com/wagtail-nest/wagtail-modeladmin)\n\nIt should be compatible with all intermediate versions, as well.\nIf you find that it is not, please [file an issue](https://github.com/cfpb/wagtail-treemodeladmin/issues/new).\n\n## Installation\n\n1. Install wagtail-treemodeladmin:\n\n```shell\npip install wagtail-treemodeladmin\n```\n\n2. Add `treemodeladmin` (and `wagtail_modeladmin` if it's not already) as an installed app in your Django `settings.py`:\n\n ```python\n INSTALLED_APPS = (\n     ...\n     'wagtail_modeladmin',\n     'treemodeladmin',\n     ...\n )\n```\n\n## Concepts\n\nWagtail-TreeModelAdmin allows for a Wagtail page explorer-like navigation of Django one-to-many relationships within the Wagtail admin. In doing this, it conceptualizes the Django [`ForeignKey`](https://docs.djangoproject.com/en/2.0/ref/models/fields/#django.db.models.ForeignKey) relationship as one of parents-to-children. The parent is the destination `to` of the `ForeignKey` relationship, the child is the source of the relationship.\n\nWagtail-TreeModelAdmin is an extension of [wagtail-modeladmin](https://github.com/wagtail-nest/wagtail-modeladmin). It is intended to be used exactly like `ModelAdmin`.\n\n## Usage\n\n### Quickstart\n\nTo use Wagtail-TreeModelAdmin you first need to define some models that will be exposed in the Wagtail Admin.\n\n```python\n# libraryapp/models.py\n\nfrom django.db import models\n\n\nclass Author(models.Model):\n    name = models.CharField(max_length=255)\n\nclass Book(models.Model):\n    author = models.ForeignKey(Author, on_delete=models.PROTECT)\n    title = models.CharField(max_length=255)\n```\n\nThen create the `TreeModelAdmin` subclasses and register the root the tree using `modeladmin_register`:\n\n```python\n# libraryapp/wagtail_hooks.py\nfrom wagtail_modeladmin.options import modeladmin_register\n\nfrom treemodeladmin.options import TreeModelAdmin\n\nfrom libraryapp.models import Author, Book\n\n\nclass BookModelAdmin(TreeModelAdmin):\n    model = Book\n    parent_field = 'author'\n\n\n@modeladmin_register\nclass AuthorModelAdmin(TreeModelAdmin):\n    menu_label = 'Library'\n    menu_icon = 'list-ul'\n    model = Author\n    child_field = 'book_set'\n    child_model_admin = BookModelAdmin\n```\n\nThen visit the Wagtail admin. `Library` will be in the menu, and will give you a list of authors, and each author will have a link that will take you to their books.\n\n## API\n\nWagtail-TreeModelAdmin uses three new attributes on ModelAdmin subclasses to express parent/child relationships:\n\n- `parent_field`: The name of the Django [`ForeignKey`](https://docs.djangoproject.com/en/2.0/ref/models/fields/#django.db.models.ForeignKey) on a child model.\n- `child_field`: The [`related_name`](https://docs.djangoproject.com/en/3.2/ref/models/fields/#django.db.models.ForeignKey.related_name) on a Django `ForeignKey`.\n- `child_model_admin`\n\nAny `TreeModelAdmin` subclass can specify both parent and child relationships. The root of the tree (either the `TreeModelAdmin` included in a `ModelAdminGroup` or the `@modeladmin_register`ed `TreeModelAdmin` subclass) should only include `child_*` fields.\n\n## Getting help\n\nPlease add issues to the [issue tracker](https://github.com/cfpb/wagtail-treemodeladmin/issues).\n\n## Getting involved\n\nGeneral instructions on _how_ to contribute can be found in [CONTRIBUTING](CONTRIBUTING.md).\n\n## Licensing\n\n1. [TERMS](TERMS.md)\n2. [LICENSE](LICENSE)\n3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/)\n\n## Credits and references\n\n1. Forked from [cfgov-refresh](https://github.com/cfpb/cfgov-refresh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Fwagtail-treemodeladmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfpb%2Fwagtail-treemodeladmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Fwagtail-treemodeladmin/lists"}