{"id":15024469,"url":"https://github.com/zerc/django-light-draft","last_synced_at":"2025-10-26T02:42:27.485Z","repository":{"id":18622168,"uuid":"21827956","full_name":"zerc/django-light-draft","owner":"zerc","description":"Preview changes without saving the data into the database","archived":false,"fork":false,"pushed_at":"2023-02-10T21:12:07.000Z","size":194,"stargazers_count":11,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-22T10:02:59.672Z","etag":null,"topics":["django","django-application","preview","python","python2","python3"],"latest_commit_sha":null,"homepage":"","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/zerc.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2014-07-14T17:05:39.000Z","updated_at":"2022-04-16T20:14:30.000Z","dependencies_parsed_at":"2024-10-14T04:40:35.397Z","dependency_job_id":"cd463298-0707-495c-a148-0a0db9fc9d07","html_url":"https://github.com/zerc/django-light-draft","commit_stats":{"total_commits":95,"total_committers":5,"mean_commits":19.0,"dds":"0.11578947368421055","last_synced_commit":"0f47045b2ea954bd982cad2cf7d87a47e840aa9b"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/zerc/django-light-draft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerc%2Fdjango-light-draft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerc%2Fdjango-light-draft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerc%2Fdjango-light-draft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerc%2Fdjango-light-draft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerc","download_url":"https://codeload.github.com/zerc/django-light-draft/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerc%2Fdjango-light-draft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281051006,"owners_count":26435739,"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-26T02:00:06.575Z","response_time":61,"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","django-application","preview","python","python2","python3"],"created_at":"2024-09-24T20:00:23.807Z","updated_at":"2025-10-26T02:42:27.472Z","avatar_url":"https://github.com/zerc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://raw.githubusercontent.com/zerc/django-light-draft/master/example/blog/static/images/DLD.png\n   :alt: Django Light Draft\n\n.. image:: https://travis-ci.org/zerc/django-light-draft.svg?branch=master\n  :target: https://travis-ci.org/zerc/django-light-draft\n.. image:: https://codecov.io/gh/zerc/django-light-draft/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/zerc/django-light-draft\n  \nPreview model changes without saving them into the database.  `Watch a demo \u003chttps://youtu.be/3pszDTUIfmg\u003e`_ on YouTube.\n\nRequirements:\n\n* Django \u003e= 1.8.x\n* Python \u003e= 2.7.x\n\nQuickstart\n----------\n\nInstal the package via ``pip``:\n\n.. code:: shell\n\n    pip install django-light-draft\n\nAdd next lines to the ``settings.py`` of your project:\n\n.. code:: python\n\n    INSTALLED_APPS = (\n        ...,\n        'light_draft',\n    )\n\n    # Default settings. If you are happy with them - you can omit them.\n    DRAFT_SETTINGS = {\n        'cache_name': 'default',  # or any other cache you may have\n        'ttl': 60*5,\n    }\n\n\nTo make it work, you need to have at least ``default`` cache defined. If you are not familiar with this term check out `documentation \u003chttps://docs.djangoproject.com/en/2.0/topics/cache/\u003e`_. In simpliest case you can enable in memory like this:\n\n.. code:: python\n\n    CACHES = {\n        'default': {\n            'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',\n            'LOCATION': 'just-an-example',\n        }\n    }\n\n\nThen, in order to enable the feature for a particular model you need to make sure:\n\n1. The admin model has been inherited from ``light_draft.admin.DraftAdmin``:\n\n.. code:: python\n\n    from light_draft.admin import DraftAdmin\n\n    class MyModelAdmin(DraftAdmin):\n        ...\n\n2. The detail view of your model has been inherited from ``light_draft.views.BaseDraftView``:\n\n.. code:: python\n\n    from light_draft.views import BaseDraftView\n\n    class MyModelDetailView(BaseDraftView):\n        ...\n\n3. The model has ``.get_absolute_url()`` method defined.\n\nSee ``example/blog`` app for more details.\n\nContributing\n------------\n\nSee `CONTRIBUTING.md \u003cCONTRIBUTING.md\u003e`_ file for information how you can contribute to the project. Cheers!\n\n\nLicence \u0026 Authors\n-----------------\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Vladimir Savin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerc%2Fdjango-light-draft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerc%2Fdjango-light-draft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerc%2Fdjango-light-draft/lists"}