Metadata-Version: 2.4
Name: djangocms-timed-publishing
Version: 0.2.0
Summary: djangocms-versioning extension to time your publications
Author: fsbraun
License: BSD 3-Clause License
        
        Copyright (c) 2025, Fabian Braun
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Bug Reports, https://github.com/fsbraun/djangocms-timed-publishing/issues
Project-URL: Homepage, https://github.com/fsbraun/djangocms-timed-publishing
Project-URL: Source, https://github.com/fsbraun/djangocms-timed-publishing
Keywords: cms,django,djangocms,publications,timed,versioning
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django CMS
Classifier: Framework :: Django CMS :: 4.1
Classifier: Framework :: Django CMS :: 5.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: django-cms>=4.1
Requires-Dist: djangocms-versioning>=2
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-django; extra == "dev"
Requires-Dist: tox; extra == "dev"
Provides-Extra: test
Requires-Dist: coverage; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-django; extra == "test"
Dynamic: license-file

[![PyPI version](https://badge.fury.io/py/djangocms-timed-publishing.svg)](http://badge.fury.io/py/djangocms-timed-publishing)
[![Coverage Status](https://codecov.io/gh/fsbraun/djangocms-timed-publishing/graph/badge.svg?token=EQeaSCSVkU)](https://codecov.io/gh/fsbraun/djangocms-timed-publishing)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/djangocms-timed-publishing)](https://pypi.org/project/djangocms-timed-publishing/)
[![PyPI - Django Versions](https://img.shields.io/pypi/frameworkversions/django/djangocms-timed-publishing)](https://www.djangoproject.com/)
[![PyPI - django CMS Versions](https://img.shields.io/pypi/frameworkversions/django-cms/djangocms-timed-publishing)](https://www.django-cms.org/)


# djangocms-timed-publishing
django CMS Timed Publishing extends django CMS Versioning to allow for planned or limited publication of content:

* New option to publish with beginning and end dates.
  By default this is done from the versioning menu and the "Publish" button does not change behavior.
  The menu brings up a modal allowing to select time limits for the visibility of the to-be-published version:

  Alternatively, with the setting `DJANGOCMS_TIMED_PUBLISHING_BUTTON = True`, the "Publish" button changes
  behavior and always opens the modal to ask for beginning and end dates.

  Publishing from the admin - be it the page tree or the version manager - is not affected.

* Technically, the time limits do not affect the published status but only the visibility. This means, dates on published
  versions cannot be changed any more. You need to create a new draft and publish that to make a change.

* Versioning menu shows pending or expired visibility dates. "pending" is a word for a published version that is
  not yet visible. "expired" is a word for a published version not visible any more:

* "View published" button for PageContents is only offered for pages which are currently visible
  (since otherwise they'll show a 404)

* Pending or expired aliases render empty.


![Timed Publishing](timed-publishing.jpg)

## Installation

1. Install the package using pip:

    ```bash
    pip install git+https://github.com/fsbraun/djangocms-timed-publishing
    ```

2. Add `"djangocms_timed_publishing"` after  `"djangocms_versioning"` to your `INSTALLED_APPS` in `settings.py`:

    ```python
    INSTALLED_APPS = [
         # ...
         "djangocms_versioning",
         "djangocms_timed_publishing",
         # ...
    ]
    ```

3. Run migrations:

    ```bash
    python manage.py migrate
    ```
