Metadata-Version: 2.4
Name: ocyan.plugin.redirect
Version: 0.1.1rc2
Summary: Guarded legacy-URL redirect fallback for Ocyan sites
Author-email: MandelBlog <info@mandelblog.com>
License-Expression: LicenseRef-Proprietary
Project-URL: Repository, https://git.mandelblog.com/mandel-plugins/ocyan.plugin.redirect
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django :: 5.2
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
Requires-Dist: Django<5.3,>=5.2
Requires-Dist: ocyan.core<1.3,>=1.2.14
Provides-Extra: import
Requires-Dist: Levenshtein<0.28,>=0.27; extra == "import"
Requires-Dist: openpyxl<3.2,>=3.1; extra == "import"
Requires-Dist: ocyan.plugin.oscar<2.1,>=2.0.5; extra == "import"

# ocyan.plugin.redirect

Guarded Django/Ocyan fallback redirects from preserved legacy paths to current
object URLs.

## Responsibility

The plugin owns persisted legacy-path mappings and a 404 handler. It resolves a
mapped object under its stored language and returns a permanent `301` only when
the object supplies a destination URL. Incoming query strings are preserved
when the destination has none; a destination query remains authoritative.
Exact self redirects are refused and fall through to the normal 404 response.

It does not own URL routing, Wagtail redirects, content migrations, SEO policy,
external redirects, or automatic redirect imports. The optional spreadsheet
import command requires `ocyan.plugin.redirect[import]` and is explicitly
operator-invoked.

## Compatibility

Certified with Python 3.12, Django 5.2 and `ocyan.core 1.2.x`. The optional
operator import command adds the certified `ocyan.plugin.oscar 2.0.x` contract.
Existing migrations and the `redirect` app label are preserved for deployed
database compatibility.

## Validation

The deterministic suite verifies 301 semantics, query preservation, target
query precedence, exact loop refusal, trailing-slash behaviour and package
artifact provenance. No production redirect data is modified by certification.
