plain.redirection 0.35.5__tar.gz → 0.35.6__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.35.5 → plain_redirection-0.35.6}/.gitignore +1 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/PKG-INFO +2 -2
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/CHANGELOG.md +10 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/models.py +21 -22
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/pyproject.toml +2 -2
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/LICENSE +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/README.md +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/README.md +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/__init__.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/admin.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/chores.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/config.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/default_settings.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/middleware.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/migrations/0001_initial.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/migrations/0002_rename_plainredire_created_d5f0c7_idx_plainredirection_notfoundlog_created_at_idx_and_more.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/migrations/0003_redirectlog_plainredirection_redirectlog_redirect_id_idx.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/migrations/__init__.py +0 -0
- {plain_redirection-0.35.5 → plain_redirection-0.35.6}/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.35.
|
|
3
|
+
Version: 0.35.6
|
|
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.105.0
|
|
10
10
|
Requires-Dist: plain<1.0.0,>=0.123.0
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# plain-redirection changelog
|
|
2
2
|
|
|
3
|
+
## [0.35.6](https://github.com/dropseed/plain/releases/plain-redirection@0.35.6) (2026-05-25)
|
|
4
|
+
|
|
5
|
+
### What's changed
|
|
6
|
+
|
|
7
|
+
- Internal: model field declarations updated for plain.postgres's new parameterized-descriptor field typing. ([229ecdbbfa](https://github.com/dropseed/plain/commit/229ecdbbfa))
|
|
8
|
+
|
|
9
|
+
### Upgrade instructions
|
|
10
|
+
|
|
11
|
+
- No changes required.
|
|
12
|
+
|
|
3
13
|
## [0.35.5](https://github.com/dropseed/plain/releases/plain-redirection@0.35.5) (2026-05-05)
|
|
4
14
|
|
|
5
15
|
### What's changed
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import re
|
|
4
|
-
from datetime import datetime
|
|
5
4
|
from typing import TYPE_CHECKING
|
|
6
5
|
|
|
7
6
|
from plain import postgres
|
|
@@ -15,16 +14,16 @@ __all__ = ["NotFoundLog", "Redirect", "RedirectLog"]
|
|
|
15
14
|
|
|
16
15
|
@postgres.register_model
|
|
17
16
|
class Redirect(postgres.Model):
|
|
18
|
-
from_pattern
|
|
19
|
-
to_pattern
|
|
20
|
-
http_status
|
|
17
|
+
from_pattern = types.TextField(max_length=255)
|
|
18
|
+
to_pattern = types.TextField(max_length=255)
|
|
19
|
+
http_status = types.SmallIntegerField(
|
|
21
20
|
default=301
|
|
22
21
|
) # Default to permanent - could be choices?
|
|
23
|
-
created_at
|
|
24
|
-
updated_at
|
|
25
|
-
order
|
|
26
|
-
enabled
|
|
27
|
-
is_regex
|
|
22
|
+
created_at = types.DateTimeField(create_now=True)
|
|
23
|
+
updated_at = types.DateTimeField(create_now=True, update_now=True)
|
|
24
|
+
order = types.SmallIntegerField(default=0)
|
|
25
|
+
enabled = types.BooleanField(default=True)
|
|
26
|
+
is_regex = types.BooleanField(default=False)
|
|
28
27
|
|
|
29
28
|
# query params?
|
|
30
29
|
# logged in or not? auth not required necessarily...
|
|
@@ -94,19 +93,19 @@ class Redirect(postgres.Model):
|
|
|
94
93
|
|
|
95
94
|
@postgres.register_model
|
|
96
95
|
class RedirectLog(postgres.Model):
|
|
97
|
-
redirect
|
|
96
|
+
redirect = types.ForeignKeyField(Redirect, on_delete=postgres.CASCADE)
|
|
98
97
|
|
|
99
98
|
# The actuals that were used to redirect
|
|
100
|
-
from_url
|
|
101
|
-
to_url
|
|
102
|
-
http_status
|
|
99
|
+
from_url = types.URLField(max_length=512)
|
|
100
|
+
to_url = types.URLField(max_length=512)
|
|
101
|
+
http_status = types.SmallIntegerField(default=301)
|
|
103
102
|
|
|
104
103
|
# Request metadata
|
|
105
|
-
ip_address
|
|
106
|
-
user_agent
|
|
107
|
-
referrer
|
|
104
|
+
ip_address = types.GenericIPAddressField()
|
|
105
|
+
user_agent = types.TextField(required=False, max_length=512)
|
|
106
|
+
referrer = types.TextField(required=False, max_length=512)
|
|
108
107
|
|
|
109
|
-
created_at
|
|
108
|
+
created_at = types.DateTimeField(create_now=True)
|
|
110
109
|
|
|
111
110
|
query: postgres.QuerySet[RedirectLog] = postgres.QuerySet()
|
|
112
111
|
|
|
@@ -154,14 +153,14 @@ class RedirectLog(postgres.Model):
|
|
|
154
153
|
|
|
155
154
|
@postgres.register_model
|
|
156
155
|
class NotFoundLog(postgres.Model):
|
|
157
|
-
url
|
|
156
|
+
url = types.URLField(max_length=512)
|
|
158
157
|
|
|
159
158
|
# Request metadata
|
|
160
|
-
ip_address
|
|
161
|
-
user_agent
|
|
162
|
-
referrer
|
|
159
|
+
ip_address = types.GenericIPAddressField()
|
|
160
|
+
user_agent = types.TextField(required=False, max_length=512)
|
|
161
|
+
referrer = types.TextField(required=False, max_length=512)
|
|
163
162
|
|
|
164
|
-
created_at
|
|
163
|
+
created_at = types.DateTimeField(create_now=True)
|
|
165
164
|
|
|
166
165
|
query: postgres.QuerySet[NotFoundLog] = postgres.QuerySet()
|
|
167
166
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "plain.redirection"
|
|
3
|
-
version = "0.35.
|
|
3
|
+
version = "0.35.6"
|
|
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.105.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
|
{plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/migrations/0001_initial.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plain_redirection-0.35.5 → plain_redirection-0.35.6}/plain/redirection/migrations/__init__.py
RENAMED
|
File without changes
|