Metadata-Version: 2.1
Name: django-secretary
Version: 0.6.0
Summary: Django application for generating documents
Home-page: UNKNOWN
Author: Vlastimil Zíma
Author-email: vlastimil.zima@nic.cz
License: GPLv3+
Description: ================
        Django-secretary
        ================
        
        Django application for generating documents.
        
        --------
        Settings
        --------
        
        ``SECRETARY_RENDERERS``
        =======================
        
        A list of renderers used for content negotiation for document rendering, see https://www.django-rest-framework.org/api-guide/content-negotiation/.
        All values should be dotted paths of renderer classes for Django REST framework, see https://www.django-rest-framework.org/api-guide/renderers/.
        Default value is ``('django_secretary.renderers.HtmlRenderer', 'django_secretary.renderers.TextRenderer', 'django_secretary.renderers.PdfRenderer')``.
        
        ``SECRETARY_SIGNERS``
        =====================
        
        A configuration of signers which sign the rendered templates.
        Valid value is a mapping of signer alias to it setting.
        A signer setting is a mapping with following options:
        
        ``COMMAND``
        -----------
        The command used to sign a PDF file.
        A valid value is a list of strings.
        A placeholder ``{output}`` may be used to provide a value of the ``OUTPUT`` option below.
        The command is run in the temporary working directory with the input file under name ``input.pdf``.
        This setting is required.
        
        ``ENVIRONMENT``
        ---------------
        A mapping with environment variables used to run the signer.
        Default value is ``None``.
        
        ``OUTPUT``
        ----------
        A name of the output file.
        Default value is ``input_signed.pdf``.
        
        ``SECRETARY_STATE_FLAGS_DESCRIPTIONS``
        ======================================
        A mapping of the state flags to their human readable descriptions.
        Provided setting is merged to the default descriptions.
        For default value see ``django_secretary.settings.DEFAULT_STATE_FLAGS_DESCRIPTIONS``.
        
        ``SECRETARY_TEMPLATES``
        =======================
        
        A list containing the settings for all template engines to be used for document
        rendering. Uses the same syntax as Django ``TEMPLATES`` setting, see
        https://docs.djangoproject.com/en/dev/ref/settings/#templates. Default value is
        same as ``TEMPLATES``. It is highly recommended to define this setting
        explicitly to prevent undesirable impact on rendering of the application pages.
        
        Two backends are currently supported:
        ``django.template.backends.django.DjangoTemplates``, with our custom
        ``django_secretary.utils.templates.TemplateLoader``, and
        ``django.template.backends.jinja2.Jinja2``, with our
        ``django_secretary.utils.templates.JinjaTemplateLoader``. These are designed to
        use the django-secretary templates, other backends and loaders may not work
        properly.
        
        The Django backend uses the ``content`` property of the template model as its
        content, while the Jinja backend uses ``jinja_content``. A template can have
        both types of content defined, or just one. If there are more backends defined,
        they are tried one by one, until one succeeds (i.e., for example, it is a
        Django backend, and the template also has a ``content`` field).
        
        Further, a backend's ``NAME`` is also used to select a preferred backend for a
        renderer. Then the preferred backends are tried first, the rest are tried only
        if the preferred all fail.
        
        ChangeLog
        =========
        
        .. contents:: Releases
           :backlinks: none
           :local:
        
        0.6.0 (2024-05-30)
        ------------------
        
        * Drop support for python 3.7.
        * Add support for python 3.12.
        * Drop support for Django 4.0.
        * Drop support for Django 4.1.
        * Add support for Django 4.2.
        * Add support for Django 5.0.
        * Add support for Jinja2 templates (#46, #49, #50, #51, #56, #57, #64, #65, #66, #67).
        * Turn ``.utils.Template`` into ``TemplateWrapper`` (#45).
        * Add the ability to have multiple preferred backends (#44, #63).
        * Implement proper choice of engines (#54).
        * Unify basic API in ``Protocol`` (#43).
        * Add ``uid`` to the ``Template`` model (#48).
        * Implement deletion from admin interface (#55).
        * Fix doubleslashes in media path (#60).
        * Add new states translations (#52).
        * Fix annotations.
        * Update project setup.
        
        0.5.2 (2023-10-24)
        ------------------
        
        * Update premium domain wording.
        * Fix annotations.
        
        0.5.1 (2023-05-11)
        ------------------
        
        * Add new state flag descriptions (#37).
        
        0.5.0 (2023-04-11)
        ------------------
        
        * Add support for python 3.11.
        * Add support for Django 4.1.
        * Tweak administration (#33).
        * Fix type annotations.
        * Update project setup.
        
        0.4.0 (2022-08-15)
        ------------------
        
        * Add label to template collection (#31).
        * Define auto fields.
        
        0.3.0 (2022-07-21)
        ------------------
        
        * Drop support for Django 2.2.
        * Add floatformat filter override (#29).
        * Add search fields to administration (#26).
        * Update project setup.
        
        0.2.1 (2022-05-30)
        ------------------
        
        * Handle template filter errors (#21).
        * Add ``forcewrap`` filter (#15).
        * Log signer errors (#23).
        * Fix default signer output (#24).
        * Fix ``SECRETARY_STATE_FLAGS_DESCRIPTIONS`` setting (#25).
        * Fix building of locales.
        
        0.2.0 (2022-03-21)
        ------------------
        
        * Drop support for python 3.6.
        * Add support for python 3.10.
        * Drop support for Django 3.0 and 3.1.
        * Add support for Django 3.2 and 4.0.
        * Add TTF mime type.
        * Separate ``TemplateRendererMixin`` (#2).
        * Add global assets (#3).
        * Return the active template from ``get_active_template`` (#4).
        * Let fetcher search assets by name (#4).
        * Add action to activate templates to administration (#5).
        * Turn constants module into a package (#11).
        * Add DNSKEY algorithm flag and protocol enums (#11, #14).
        * Add ``SECRETARY_STATE_FLAGS_DESCRIPTIONS`` setting (#11).
        * Add template filters for parsing datetime and fred objects (#7, #9, #14).
        * Add fred filters (#9).
        * Add signer field to a template and signed PDF renderers (#12, #16).
        * Add Czech locales (#8).
        * Refactor renderer internals (#18, #19).
        * Add intermediate ``Template`` object (#20).
        * Add preferred backends for renderers (#17).
        * Fix bugs in tests.
        * Update static checks & project setup.
        * Update mypy & fix annotations.
        
        0.1.0 (2020-09-07)
        ------------------
        
        Initial version.
        
        * Simple service for managing and rendering templates.
        
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
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: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: ~=3.8
Provides-Extra: quality
Provides-Extra: test
Provides-Extra: types
