{"id":15354592,"url":"https://github.com/timonweb/wagtailsnippetscopy","last_synced_at":"2025-10-29T16:14:59.646Z","repository":{"id":62588087,"uuid":"116820935","full_name":"timonweb/wagtailsnippetscopy","owner":"timonweb","description":"'Copy A Snippet' Feature for Wagtail CMS","archived":false,"fork":false,"pushed_at":"2024-05-13T16:57:20.000Z","size":17,"stargazers_count":6,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T04:12:27.137Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timonweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-01-09T13:40:49.000Z","updated_at":"2024-10-31T14:25:36.000Z","dependencies_parsed_at":"2024-10-16T03:00:51.430Z","dependency_job_id":null,"html_url":"https://github.com/timonweb/wagtailsnippetscopy","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.125,"last_synced_commit":"38413488336d1c38cd2cd5f95f62aa4826271f21"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/timonweb/wagtailsnippetscopy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Fwagtailsnippetscopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Fwagtailsnippetscopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Fwagtailsnippetscopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Fwagtailsnippetscopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timonweb","download_url":"https://codeload.github.com/timonweb/wagtailsnippetscopy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonweb%2Fwagtailsnippetscopy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260527554,"owners_count":23022782,"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","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-10-01T12:19:56.576Z","updated_at":"2025-10-29T16:14:59.549Z","avatar_url":"https://github.com/timonweb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 'Copy A Snippet' Feature for Wagtail CMS\n\nYou can now \"copy\" snippets (non-page models) in Wagtail CMS\n\n## Installation\n\n1. Install the python package wagtailsnippetscopy from pip\n\n`pip install wagtailsnippetscopy`\n\nAlternatively, you can install download or clone this repo and call `pip install -e .`.\n\n2. Add to INSTALLED_APPS in your **settings.py**:\n\n`'wagtailsnippetscopy',`\n\n3. Register a model (with a title field name) you wish to enable copy functionality for:\n\n```python\nfrom wagtailsnippetscopy.registry import snippet_copy_registry\n\nsnippet_copy_registry.register(YourModel, {})\n```\n\n4. Add SnippetCopyMixin to your Snippet model in order to enable get_copy_url callback() for the model:\n\n```python\nfrom wagtailsnippetscopy.models import SnippetCopyMixin\n\nclass Graph(SnippetCopyMixin, models.Model):\n```\n\n5. If you wish copy link to automatically appear in modeladmin list you should add SnippetCopyModelAdminMixin to the ModelAdmin class:\n\nIn admin.py:\n\n```python\nfrom wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register\nfrom wagtailsnippetscopy.admin import SnippetCopyModelAdminMixin\nfrom .models import YourModel\n\nclass YourModelAdmin(SnippetCopyModelAdminMixin, ModelAdmin):\n    model = YourModel\n\nmodeladmin_register(GraphAdmin)\n```\n\n6. Copy link follows the following pattern:\n\n```\n/admin/copy-snippet/\u003capp_label\u003e/\u003cmodel_name\u003e/\u003cobject_id\u003e/\n```\n\n## Bugs and suggestions\n\nIf you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.\n\n[https://github.com/timonweb/wagtailsnippetscopy/issues](https://github.com/timonweb/wagtailsnippetscopy/issues)\n\nby [Tim Kamanin](https://timonweb.com/wagtail-developer/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimonweb%2Fwagtailsnippetscopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimonweb%2Fwagtailsnippetscopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimonweb%2Fwagtailsnippetscopy/lists"}