Skip to main content

entirius-django-returns

A Django module for order returns (RMA) in Entirius, the open-source modular ecommerce platform. Customers file a return request for a completed order, attach files and download a PDF return form; the order moves to its returned status.

PyPI Python License: MPL-2.0

What it does

  • Lists the items of a completed order that can still be returned, within a configurable return window.
  • Creates return requests with the return method, the chosen solution, a comment and attachments.
  • Generates a PDF return form and sends a confirmation email.
  • Links every return to the checkout order and to the customer account.
  • Exposes a key-protected storefront REST API per sales channel, plus admin download routes for attachments.

Installation

uv add entirius-django-returns
pip install entirius-django-returns
INSTALLED_APPS = [
    ...
    "django_utils",
    "django_regional",
    "django_accounts",
    "django_pim",
    "django_pricemanager",
    "django_email",
    "django_checkout",
    "django_returns",
]

# urls.py
urlpatterns = [
    path("", include("django_returns.urls")),
]

Required setting: PRIVATE_DIR, the root directory of attachment storage; the module refuses to import without it. The checkout module it builds on has required settings of its own, listed in https://github.com/entirius/entirius-django-checkout/blob/develop/README.md. Optional settings (API_BASE_URL, DAYS_TO_RETURN, LOGO_URL, PDF_RETURN_TEMPLATE, RETURNS_ALLOWED_ATTACHMENT_EXTENSIONS) are listed in https://github.com/entirius/entirius-django-returns/blob/develop/AGENTS.md (section Settings).

The storefront API reads its key from the X-API-KEY header. With django_access installed the key is an access token with the scope returns.api:

python manage.py access_token create --application <name> --create-application --scope returns.api --channel <idx>

Without django_access, create the key with python manage.py returns-generate-api-key.

Quick start

from django_returns.models import OrderReturn, ReturnStatus

open_returns = OrderReturn.objects.filter(status=ReturnStatus.OPEN).select_related("order", "customer")

Requirements

  • Python 3.11 or newer, Django 5.0 or newer.
  • PostgreSQL.
  • Entirius packages pulled in: entirius-django-checkout (orders and their status flow), entirius-django-email (confirmation email), entirius-django-accounts (customer), entirius-django-utils, entirius-py-pdf-generator (return form), entirius-py-bievents, entirius-py-process-logger.

Documentation

Part of Entirius

This module runs inside the Entirius backend service (Volkanos) as a satellite of the checkout module.

Development

make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest + pytest-django, needs PostgreSQL via DATABASE_URL)

Development and agent instructions: https://github.com/entirius/entirius-django-returns/blob/develop/AGENTS.md

License

Mozilla Public License 2.0 (MPL-2.0) — see https://github.com/entirius/entirius-django-returns/blob/develop/LICENSE.

Metadata

Release files for entirius-django-returns 4.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for entirius-django-returns 4.0.1
File Size Uploaded Provenance Actions
entirius_django_returns-4.0.1.tar.gz 172.7 kB Without provenance Details for entirius_django_returns-4.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for entirius-django-returns 4.0.1
File Interpreter ABI Platform Actions
entirius_django_returns-4.0.1-py3-none-any.whl Python 3 none any Details for entirius_django_returns-4.0.1-py3-none-any.whl

Total release size: 209.0 kB

Release files / entirius_django_returns-4.0.1.tar.gz

Download URL entirius_django_returns-4.0.1.tar.gz
Size 172.7 kB
Tags Source
SHA-256 checksum
How to use checksums
995b64aac1699b4d60ea9b606a20e70f5d3a3e555a81013c3d79d1ed4ab2ba8f
BLAKE2b-256 checksum
How to use checksums
50fe10dfe7878e6546a3c563770c17597dc37600db5738e392c97821b4d54f48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / entirius_django_returns-4.0.1-py3-none-any.whl

Download URL entirius_django_returns-4.0.1-py3-none-any.whl
Size 36.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
069cff30d233776839f1b52a4e946c36fc87b245404d78e69a685eb08b3b0001
BLAKE2b-256 checksum
How to use checksums
8c50b29e87a90db87c867e71d06392ada3d1fa3e53cf4867e0e1cb0d4bab7c43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for entirius-django-returns 4.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page