plain.redirection 0.33.1__tar.gz → 0.35.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/PKG-INFO +2 -2
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/CHANGELOG.md +21 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/migrations/0001_initial.py +6 -6
- plain_redirection-0.35.0/plain/redirection/migrations/0003_redirectlog_plainredirection_redirectlog_redirect_id_idx.py +26 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/models.py +10 -6
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/pyproject.toml +2 -2
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/.gitignore +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/LICENSE +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/README.md +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/README.md +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/__init__.py +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/admin.py +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/chores.py +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/config.py +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/default_settings.py +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/middleware.py +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/migrations/0002_rename_plainredire_created_d5f0c7_idx_plainredirection_notfoundlog_created_at_idx_and_more.py +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/migrations/__init__.py +0 -0
- {plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/templates/admin/plainredirection/redirect_form.html +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plain.redirection
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.35.0
|
|
4
4
|
Summary: A flexible URL redirection system with admin interface and logging.
|
|
5
5
|
Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Python: >=3.13
|
|
9
|
-
Requires-Dist: plain-postgres<1.0.0,>=0.
|
|
9
|
+
Requires-Dist: plain-postgres<1.0.0,>=0.89.0
|
|
10
10
|
Requires-Dist: plain<1.0.0,>=0.123.0
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# plain-redirection changelog
|
|
2
2
|
|
|
3
|
+
## [0.35.0](https://github.com/dropseed/plain/releases/plain-redirection@0.35.0) (2026-03-28)
|
|
4
|
+
|
|
5
|
+
### What's changed
|
|
6
|
+
|
|
7
|
+
- Replaced `CharField` with `TextField` in models and migration files to match plain-postgres 0.90.0 ([5062ee4dd1fd](https://github.com/dropseed/plain/commit/5062ee4dd1fd))
|
|
8
|
+
|
|
9
|
+
### Upgrade instructions
|
|
10
|
+
|
|
11
|
+
- Requires `plain-postgres>=0.90.0`
|
|
12
|
+
- Replace `CharField` with `TextField` in migration files that reference this package's models
|
|
13
|
+
|
|
14
|
+
## [0.34.0](https://github.com/dropseed/plain/releases/plain-redirection@0.34.0) (2026-03-25)
|
|
15
|
+
|
|
16
|
+
### What's changed
|
|
17
|
+
|
|
18
|
+
- Added explicit `Index` on `RedirectLog.redirect` FK field — replaces the old auto-created index from `db_index=True`. Migration drops the orphan auto-index and creates the new named index. ([061b97f5d538](https://github.com/dropseed/plain/commit/061b97f5d538))
|
|
19
|
+
|
|
20
|
+
### Upgrade instructions
|
|
21
|
+
|
|
22
|
+
- Requires `plain-postgres>=0.89.0`. Run `uv run plain postgres migrate`.
|
|
23
|
+
|
|
3
24
|
## [0.33.1](https://github.com/dropseed/plain/releases/plain-redirection@0.33.1) (2026-03-25)
|
|
4
25
|
|
|
5
26
|
### What's changed
|
{plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/migrations/0001_initial.py
RENAMED
|
@@ -15,8 +15,8 @@ class Migration(migrations.Migration):
|
|
|
15
15
|
name="Redirect",
|
|
16
16
|
fields=[
|
|
17
17
|
("id", postgres.PrimaryKeyField()),
|
|
18
|
-
("from_pattern", postgres.
|
|
19
|
-
("to_pattern", postgres.
|
|
18
|
+
("from_pattern", postgres.TextField(max_length=255)),
|
|
19
|
+
("to_pattern", postgres.TextField(max_length=255)),
|
|
20
20
|
("http_status", postgres.PositiveSmallIntegerField(default=301)),
|
|
21
21
|
("created_at", postgres.DateTimeField(auto_now_add=True)),
|
|
22
22
|
("updated_at", postgres.DateTimeField(auto_now=True)),
|
|
@@ -36,8 +36,8 @@ class Migration(migrations.Migration):
|
|
|
36
36
|
("to_url", postgres.URLField(max_length=512)),
|
|
37
37
|
("http_status", postgres.PositiveSmallIntegerField(default=301)),
|
|
38
38
|
("ip_address", postgres.GenericIPAddressField()),
|
|
39
|
-
("user_agent", postgres.
|
|
40
|
-
("referrer", postgres.
|
|
39
|
+
("user_agent", postgres.TextField(max_length=512, required=False)),
|
|
40
|
+
("referrer", postgres.TextField(max_length=512, required=False)),
|
|
41
41
|
("created_at", postgres.DateTimeField(auto_now_add=True)),
|
|
42
42
|
],
|
|
43
43
|
options={
|
|
@@ -50,8 +50,8 @@ class Migration(migrations.Migration):
|
|
|
50
50
|
("id", postgres.PrimaryKeyField()),
|
|
51
51
|
("url", postgres.URLField(max_length=512)),
|
|
52
52
|
("ip_address", postgres.GenericIPAddressField()),
|
|
53
|
-
("user_agent", postgres.
|
|
54
|
-
("referrer", postgres.
|
|
53
|
+
("user_agent", postgres.TextField(max_length=512, required=False)),
|
|
54
|
+
("referrer", postgres.TextField(max_length=512, required=False)),
|
|
55
55
|
("created_at", postgres.DateTimeField(auto_now_add=True)),
|
|
56
56
|
],
|
|
57
57
|
options={
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Generated by Plain 0.127.2 on 2026-03-25 22:04
|
|
2
|
+
|
|
3
|
+
from plain import postgres
|
|
4
|
+
from plain.postgres import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
dependencies = [
|
|
9
|
+
(
|
|
10
|
+
"plainredirection",
|
|
11
|
+
"0002_rename_plainredire_created_d5f0c7_idx_plainredirection_notfoundlog_created_at_idx_and_more",
|
|
12
|
+
),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
operations = [
|
|
16
|
+
# Drop orphan auto-index from old db_index=True default
|
|
17
|
+
migrations.RunSQL(
|
|
18
|
+
'DROP INDEX IF EXISTS "plainredirection_redirectlog_redirect_id_72c2ae26"'
|
|
19
|
+
),
|
|
20
|
+
migrations.AddIndex(
|
|
21
|
+
model_name="redirectlog",
|
|
22
|
+
index=postgres.Index(
|
|
23
|
+
fields=["redirect"], name="plainredirection_redirectlog_redirect_id_idx"
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
]
|
|
@@ -15,8 +15,8 @@ __all__ = ["NotFoundLog", "Redirect", "RedirectLog"]
|
|
|
15
15
|
|
|
16
16
|
@postgres.register_model
|
|
17
17
|
class Redirect(postgres.Model):
|
|
18
|
-
from_pattern: str = types.
|
|
19
|
-
to_pattern: str = types.
|
|
18
|
+
from_pattern: str = types.TextField(max_length=255)
|
|
19
|
+
to_pattern: str = types.TextField(max_length=255)
|
|
20
20
|
http_status: int = types.PositiveSmallIntegerField(
|
|
21
21
|
default=301
|
|
22
22
|
) # Default to permanent - could be choices?
|
|
@@ -95,8 +95,8 @@ class RedirectLog(postgres.Model):
|
|
|
95
95
|
|
|
96
96
|
# Request metadata
|
|
97
97
|
ip_address: str = types.GenericIPAddressField()
|
|
98
|
-
user_agent: str = types.
|
|
99
|
-
referrer: str = types.
|
|
98
|
+
user_agent: str = types.TextField(required=False, max_length=512)
|
|
99
|
+
referrer: str = types.TextField(required=False, max_length=512)
|
|
100
100
|
|
|
101
101
|
created_at: datetime = types.DateTimeField(auto_now_add=True)
|
|
102
102
|
|
|
@@ -109,6 +109,10 @@ class RedirectLog(postgres.Model):
|
|
|
109
109
|
name="plainredirection_redirectlog_created_at_idx",
|
|
110
110
|
fields=["created_at"],
|
|
111
111
|
),
|
|
112
|
+
postgres.Index(
|
|
113
|
+
name="plainredirection_redirectlog_redirect_id_idx",
|
|
114
|
+
fields=["redirect"],
|
|
115
|
+
),
|
|
112
116
|
],
|
|
113
117
|
)
|
|
114
118
|
|
|
@@ -140,8 +144,8 @@ class NotFoundLog(postgres.Model):
|
|
|
140
144
|
|
|
141
145
|
# Request metadata
|
|
142
146
|
ip_address: str = types.GenericIPAddressField()
|
|
143
|
-
user_agent: str = types.
|
|
144
|
-
referrer: str = types.
|
|
147
|
+
user_agent: str = types.TextField(required=False, max_length=512)
|
|
148
|
+
referrer: str = types.TextField(required=False, max_length=512)
|
|
145
149
|
|
|
146
150
|
created_at: datetime = types.DateTimeField(auto_now_add=True)
|
|
147
151
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "plain.redirection"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.35.0"
|
|
4
4
|
description = "A flexible URL redirection system with admin interface and logging."
|
|
5
5
|
authors = [{ name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev" }]
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = "BSD-3-Clause"
|
|
8
8
|
requires-python = ">=3.13"
|
|
9
|
-
dependencies = ["plain>=0.123.0,<1.0.0", "plain.postgres>=0.
|
|
9
|
+
dependencies = ["plain>=0.123.0,<1.0.0", "plain.postgres>=0.89.0,<1.0.0"]
|
|
10
10
|
|
|
11
11
|
[tool.hatch.build.targets.wheel]
|
|
12
12
|
packages = ["plain"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plain_redirection-0.33.1 → plain_redirection-0.35.0}/plain/redirection/migrations/__init__.py
RENAMED
|
File without changes
|