Skip to content
Snippets Groups Projects
Commit 7a607419 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'rename-pdf-conext-processors' into 'master'

Rename PDF_CONTEXT_PROCESSORS

See merge request !942
parents fad47da7 663bfa37
No related branches found
No related tags found
1 merge request!942Rename PDF_CONTEXT_PROCESSORS
Pipeline #52514 passed
Pipeline: AlekSIS

#52521

    ......@@ -9,6 +9,11 @@ and this project adheres to `Semantic Versioning`_.
    Unreleased
    ----------
    Changed
    ~~~~~~~
    * [Dev] The (undocumented) setting PDF_CONTEXT_PROCESSORS is now named NON_REQUEST_CONTEXT_PROCESSORS
    `2.7.1`_ - 2022-01-28
    ---------------------
    ......
    ......@@ -203,7 +203,7 @@ TEMPLATES = [
    # Attention: The following context processors must accept None
    # as first argument (in addition to a HttpRequest object)
    PDF_CONTEXT_PROCESSORS = [
    NON_REQUEST_CONTEXT_PROCESSORS = [
    "django.template.context_processors.i18n",
    "django.template.context_processors.tz",
    "aleksis.core.util.core_helpers.custom_information_processor",
    ......
    ......@@ -15,7 +15,7 @@ def send_email(
    **kwargs,
    ):
    """Send templated email with data from context processors."""
    processed_context = process_custom_context_processors(settings.PDF_CONTEXT_PROCESSORS)
    processed_context = process_custom_context_processors(settings.NON_REQUEST_CONTEXT_PROCESSORS)
    processed_context.update(context)
    if not from_email:
    from_address = get_site_preferences()["mail__address"]
    ......
    ......@@ -74,7 +74,9 @@ def generate_pdf_from_template(
    ) -> Tuple[PDFFile, AsyncResult]:
    """Start a PDF generation task and return the matching file object and Celery result."""
    if not request:
    processed_context = process_custom_context_processors(settings.PDF_CONTEXT_PROCESSORS)
    processed_context = process_custom_context_processors(
    settings.NON_REQUEST_CONTEXT_PROCESSORS
    )
    processed_context.update(context)
    else:
    processed_context = context
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment