{"id":20797691,"url":"https://github.com/beachmachine/django-changeset","last_synced_at":"2026-03-04T16:04:30.862Z","repository":{"id":57419255,"uuid":"56316860","full_name":"beachmachine/django-changeset","owner":"beachmachine","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-12T10:39:53.000Z","size":124,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-29T02:27:39.956Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beachmachine.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}},"created_at":"2016-04-15T11:59:51.000Z","updated_at":"2024-11-27T13:44:55.000Z","dependencies_parsed_at":"2022-09-10T13:20:11.884Z","dependency_job_id":null,"html_url":"https://github.com/beachmachine/django-changeset","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/beachmachine/django-changeset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beachmachine%2Fdjango-changeset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beachmachine%2Fdjango-changeset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beachmachine%2Fdjango-changeset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beachmachine%2Fdjango-changeset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beachmachine","download_url":"https://codeload.github.com/beachmachine/django-changeset/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beachmachine%2Fdjango-changeset/sbom","scorecard":{"id":229309,"data":{"date":"2025-08-11","repo":{"name":"github.com/beachmachine/django-changeset","commit":"9ce8edbcbdf9d721c683f6890a8ee76486380ded"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"Code-Review","score":1,"reason":"Found 4/25 approved changesets -- score normalized to 1","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.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/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/beachmachine/django-changeset/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/beachmachine/django-changeset/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/beachmachine/django-changeset/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/beachmachine/django-changeset/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/beachmachine/django-changeset/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:37","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   6 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":"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: BSD 3-Clause \"New\" or \"Revised\" 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 10 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"}},{"name":"Vulnerabilities","score":0,"reason":"42 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2014-5 / GHSA-296w-6qhq-gf92","Warn: Project is vulnerable to: PYSEC-2011-2 / GHSA-3jqw-crqj-w8qw","Warn: Project is vulnerable to: PYSEC-2012-3 / GHSA-59w8-4wm2-4xw8","Warn: Project is vulnerable to: PYSEC-2012-4 / GHSA-5h2q-4hrp-v9rr","Warn: Project is vulnerable to: PYSEC-2014-6 / GHSA-625g-gx8c-xcmg","Warn: Project is vulnerable to: PYSEC-2015-8 / GHSA-6565-fg86-6jcx","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2012-2 / GHSA-78vx-ggch-wghm","Warn: Project is vulnerable to: PYSEC-2015-9 / GHSA-7fq8-4pv5-5w5c","Warn: Project is vulnerable to: PYSEC-2015-4 / GHSA-7qfw-j7hp-v45g","Warn: Project is vulnerable to: PYSEC-2011-9 / GHSA-7wph-fc4w-wqp2","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: PYSEC-2014-2 / GHSA-89hj-xfx5-7q66","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2016-2 / GHSA-c8c8-9472-w52h","Warn: Project is vulnerable to: PYSEC-2016-3 / GHSA-crhm-qpjc-cm64","Warn: Project is vulnerable to: PYSEC-2014-4 / GHSA-f7cm-ccfp-3q4r","Warn: Project is vulnerable to: PYSEC-2016-16 / GHSA-fp6p-5xvw-m74f","Warn: Project is vulnerable to: PYSEC-2011-8 / GHSA-fwr5-q9rx-294f","Warn: Project is vulnerable to: PYSEC-2015-5 / GHSA-gv98-g628-m9x5","Warn: Project is vulnerable to: PYSEC-2015-20 / GHSA-h582-2pch-3xv3","Warn: Project is vulnerable to: PYSEC-2011-5 / GHSA-h95j-h2rv-qrg4","Warn: Project is vulnerable to: GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2015-6 / GHSA-jhjg-w2cp-5j44","Warn: Project is vulnerable to: PYSEC-2016-15 / GHSA-pw27-w7w4-9qc7","Warn: Project is vulnerable to: PYSEC-2015-10 / GHSA-q5qw-4364-5hhm","Warn: Project is vulnerable to: PYSEC-2011-4 / GHSA-rm2j-x595-q9cj","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2014-1 / GHSA-rvq6-mrpv-m6rm","Warn: Project is vulnerable to: PYSEC-2014-7 / GHSA-rw75-m7gp-92m3","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2014-3 / GHSA-wqjj-hx84-v449","Warn: Project is vulnerable to: PYSEC-2011-3 / GHSA-wxg3-mfph-qg9w","Warn: Project is vulnerable to: PYSEC-2011-1 / GHSA-x88j-93vc-wpmp","Warn: Project is vulnerable to: PYSEC-2007-1","Warn: Project is vulnerable to: PYSEC-2008-1","Warn: Project is vulnerable to: PYSEC-2008-2","Warn: Project is vulnerable to: PYSEC-2009-3","Warn: Project is vulnerable to: PYSEC-2015-11","Warn: Project is vulnerable to: PYSEC-2015-7","Warn: Project is vulnerable to: PYSEC-2016-18","Warn: Project is vulnerable to: PYSEC-2022-304"],"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-17T04:32:40.823Z","repository_id":57419255,"created_at":"2025-08-17T04:32:40.823Z","updated_at":"2025-08-17T04:32:40.823Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30085848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hacktoberfest"],"created_at":"2024-11-17T16:34:55.701Z","updated_at":"2026-03-04T16:04:30.850Z","avatar_url":"https://github.com/beachmachine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django ChangeSet\n\n[![Linter and tests](https://github.com/beachmachine/django-changeset/workflows/Linter%20and%20tests/badge.svg)](https://github.com/beachmachine/django-changeset/actions)\n[![Codecov](https://img.shields.io/codecov/c/gh/beachmachine/django-changeset)](https://codecov.io/gh/beachmachine/django-changeset)\n\nDjango ChangeSet is a simple Django app that will give your models the possibility to track all changes. It depends on\n`django_userforeignkey` to determine the current user doing the change(s).\n\nSupported Python versions: 3.10 - 3.14.\nSupported Django versions: 5.2 and 6.0.\n\nDetailed documentation is in the docs subdirectory.\n\n## Quick start\n\n1.  Use `pip` to install and download django-changeset (and `django-userforeignkey`):\n\n```bash\npip install django-changeset\n```\n\n2.  Add `django_userforeignkey` and `django_changeset` to your `INSTALLED_APPS` like this:\n\n```python\nINSTALLED_APPS = [\n    ...\n    'django_userforeignkey',\n    'django_changeset',\n]\n```\n\n3.  Add `django_userforeignkey.middleware.UserForeignKeyMiddleware` to your `MIDDLEWARE` like this:\n\n```python\nMIDDLEWARE = (\n    ...\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    ...\n    'django_userforeignkey.middleware.UserForeignKeyMiddleware',\n)\n```\n\n**Note**: Make sure to insert the `UserForeignKeyMiddleware` **after** Djangos `AuthenticationMiddleware`.\n\n## Example usage\n\n**_Use `RevisionModelMixin` as a mixin class for your models and add the fields you want to track in the meta_**\nconfiguration using `track_fields` and `track_related`. Also add a generic relation to `ChangeSet` using\n`changesets = ChangeSetRelation()`:\n\n```python\nfrom django.db import models\n\nfrom django_changeset.models import RevisionModelMixin\nfrom django_changeset.models.fields import ChangeSetRelation\n\n\nclass MyModel(models.Model, RevisionModelMixin):\n    class Meta:\n        track_fields = ('my_data', )  # track changes on my_data\n        track_related = ('my_ref', )  # track changes on a related model\n\n    my_data = models.CharField(max_length=64, verbose_name=\"Very important data you want to track\")\n    my_ref = models.ForeignKey('SomeOtherModel', verbose_name=\"Very important relation\", related_name='my_models')\n\n    # Generic Relation to ChangeSet\n    changesets = ChangeSetRelation()\n```\n\nNote: If you want to have access to the properties `created_by`, `created_at`, `last_modified_by`, `last_modified_at`,\nyou need to inherit from `CreatedModifiedByMixin` aswell as `RevisionModelMixin`. For the Python MRO to work, you also\nhave to create an abstract base model:\n\n```python\nfrom django.db import models\n\nfrom django_changeset.models import CreatedModifiedByMixin, RevisionModelMixin\nfrom django_changeset.models.fields import ChangeSetRelation\n\n\n\nclass BaseModel(models.Model):\n    \"\"\"\n    BaseModel is needed for proper MRO within Python/Django Models\n    \"\"\"\n    class Meta:\n        abstract = True\n    pass\n\n\nclass MyModel(BaseModel, RevisionModelMixin, CreatedModifiedByMixin):\n    class Meta:\n        track_fields = ('my_data', )  # track changes on my_data\n        track_related = ('my_ref', )  # track changes on a related model\n\n    my_data = models.CharField(max_length=64, verbose_name=\"Very important data you want to track\")\n    my_ref = models.ForeignKey('SomeOtherModel', verbose_name=\"Very important relation\", related_name='my_models')\n\n    # Generic Relation to ChangeSet\n    changesets = ChangeSetRelation()\n```\n\n## Querying ChangeSets via the changesets relation\n\nBy inheriting from the `RevisionModelMixin` and `CreatedModifiedByMixin` mixins, and adding an attribute of type\n`ChangeSetRelation` (a `GenericRelation` for the changeset), the following features are added to your model:\n\n- Properties `created_by`, `created_at`, `last_modified_by`, `last_modified_at` are made available for each object\n  (`CreatedModifiedByMixin`)\n- Relation `changesets` is made available, allowing you to run queries like this one:\n  `MyModel.objects.filter(changesets__changeset_type='I', changesets__user__username='johndoe')`\n\n## Access ChangeSets and ChangeRecords\n\nToDo\n\nYou can access the changeset by calling the `change_set` property of an instance of `MyModel` as shown in the following\nexample:\n\n```python\nprint(\"------- CHANGE SETS (\", len(somemodel.changesets), \")---------\")\nfor change_set in somemodel.changesets:\n    # print change_set\n    print(\"Change was carried out at \", change_set.date, \" by user \", change_set.user, \" on model \", change_set.object_type)\n\n    print(\"  + CHANGE RECORDS (\", len(change_set.change_records.all()), \"): \")\n    for change_record in change_set.change_records.all():\n        print(\"\\t\", change_record)\n        print(\"\\tIs change on a related field?\", change_record.is_related)\n        # related fields: we only know that something new has been added. we know the PK, but not the object itself\n        print(\"\\t\\tChanged field \", change_record.field_name, \"(\", change_record.field_verbose_name, \") from \",\n              change_record.old_value, \"(display:\", change_record.old_value_display, \") to\")\n        print(\"\\t\\t \", change_record.new_value, \"(display:\", change_record.new_value_display, \")\")\n        if change_record.is_related:\n            print(\"\\t\\tRelated Object Info: \", change_record.related_object)\n    # TODO:\n    # change_set.created_at, change_set.created_by, change_set.last_modified_by, change_set.last_modified_at\n\n    print(\"-----\")\n```\n\n## Maintainers\n\nThis repository is currently maintained by\n\n- beachmachine\n- mikelandzelo173\n\nPull Requests are welcome.\n\n## License\n\nDjango ChangeSet uses the BSD-3 Clause License, see LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeachmachine%2Fdjango-changeset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeachmachine%2Fdjango-changeset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeachmachine%2Fdjango-changeset/lists"}