plain.redirection 0.2.0__tar.gz → 0.2.2__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.2.0 → plain_redirection-0.2.2}/PKG-INFO +1 -1
- plain_redirection-0.2.2/plain/redirection/migrations/0004_alter_notfoundlog_referer_alter_redirectlog_referer.py +25 -0
- plain_redirection-0.2.2/plain/redirection/migrations/0005_alter_notfoundlog_referer_and_more.py +36 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/models.py +4 -4
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/staff.py +6 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/pyproject.toml +1 -1
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/.gitignore +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/README.md +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/README.md +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/__init__.py +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/config.py +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/middleware.py +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/migrations/0001_initial.py +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/migrations/0002_redirect_enabled_redirect_is_regex.py +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/migrations/0003_alter_redirect_from_pattern.py +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/migrations/__init__.py +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/templates/staff/plainredirection/redirect_form.html +0 -0
- {plain_redirection-0.2.0 → plain_redirection-0.2.2}/uv.lock +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Generated by Plain 0.21.1 on 2025-02-06 16:36
|
|
2
|
+
|
|
3
|
+
from plain import models
|
|
4
|
+
from plain.models import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
dependencies = [
|
|
9
|
+
("plainredirection", "0003_alter_redirect_from_pattern"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AlterField(
|
|
14
|
+
model_name="notfoundlog",
|
|
15
|
+
name="referer",
|
|
16
|
+
field=models.CharField(blank=True, default=""),
|
|
17
|
+
preserve_default=False,
|
|
18
|
+
),
|
|
19
|
+
migrations.AlterField(
|
|
20
|
+
model_name="redirectlog",
|
|
21
|
+
name="referer",
|
|
22
|
+
field=models.CharField(blank=True, default=""),
|
|
23
|
+
preserve_default=False,
|
|
24
|
+
),
|
|
25
|
+
]
|
plain_redirection-0.2.2/plain/redirection/migrations/0005_alter_notfoundlog_referer_and_more.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Generated by Plain 0.21.1 on 2025-02-06 16:38
|
|
2
|
+
|
|
3
|
+
from plain import models
|
|
4
|
+
from plain.models import migrations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
dependencies = [
|
|
9
|
+
(
|
|
10
|
+
"plainredirection",
|
|
11
|
+
"0004_alter_notfoundlog_referer_alter_redirectlog_referer",
|
|
12
|
+
),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
operations = [
|
|
16
|
+
migrations.AlterField(
|
|
17
|
+
model_name="notfoundlog",
|
|
18
|
+
name="referer",
|
|
19
|
+
field=models.CharField(blank=True, max_length=512),
|
|
20
|
+
),
|
|
21
|
+
migrations.AlterField(
|
|
22
|
+
model_name="notfoundlog",
|
|
23
|
+
name="user_agent",
|
|
24
|
+
field=models.CharField(max_length=512),
|
|
25
|
+
),
|
|
26
|
+
migrations.AlterField(
|
|
27
|
+
model_name="redirectlog",
|
|
28
|
+
name="referer",
|
|
29
|
+
field=models.CharField(blank=True, max_length=512),
|
|
30
|
+
),
|
|
31
|
+
migrations.AlterField(
|
|
32
|
+
model_name="redirectlog",
|
|
33
|
+
name="user_agent",
|
|
34
|
+
field=models.CharField(max_length=512),
|
|
35
|
+
),
|
|
36
|
+
]
|
|
@@ -73,8 +73,8 @@ class RedirectLog(models.Model):
|
|
|
73
73
|
|
|
74
74
|
# Request metadata
|
|
75
75
|
ip_address = models.GenericIPAddressField()
|
|
76
|
-
user_agent = models.CharField(max_length=
|
|
77
|
-
referer = models.
|
|
76
|
+
user_agent = models.CharField(max_length=512)
|
|
77
|
+
referer = models.CharField(blank=True, max_length=512)
|
|
78
78
|
|
|
79
79
|
created_at = models.DateTimeField(auto_now_add=True)
|
|
80
80
|
|
|
@@ -108,8 +108,8 @@ class NotFoundLog(models.Model):
|
|
|
108
108
|
|
|
109
109
|
# Request metadata
|
|
110
110
|
ip_address = models.GenericIPAddressField()
|
|
111
|
-
user_agent = models.CharField(max_length=
|
|
112
|
-
referer = models.
|
|
111
|
+
user_agent = models.CharField(max_length=512)
|
|
112
|
+
referer = models.CharField(blank=True, max_length=512)
|
|
113
113
|
|
|
114
114
|
created_at = models.DateTimeField(auto_now_add=True)
|
|
115
115
|
|
|
@@ -34,6 +34,8 @@ class RedirectStaff(StaffModelViewset):
|
|
|
34
34
|
nav_section = "Redirection"
|
|
35
35
|
title = "Redirects"
|
|
36
36
|
fields = ["from_pattern", "to_pattern", "http_status", "order", "enabled"]
|
|
37
|
+
search_fields = ["from_pattern", "to_pattern"]
|
|
38
|
+
allow_global_search = False
|
|
37
39
|
|
|
38
40
|
class DetailView(StaffModelDetailView):
|
|
39
41
|
model = Redirect
|
|
@@ -65,6 +67,8 @@ class RedirectLogStaff(StaffModelViewset):
|
|
|
65
67
|
"ip_address",
|
|
66
68
|
"referer",
|
|
67
69
|
]
|
|
70
|
+
search_fields = ["from_url", "to_url", "user_agent", "ip_address", "referer"]
|
|
71
|
+
allow_global_search = False
|
|
68
72
|
|
|
69
73
|
class DetailView(StaffModelDetailView):
|
|
70
74
|
model = RedirectLog
|
|
@@ -77,6 +81,8 @@ class NotFoundLogStaff(StaffModelViewset):
|
|
|
77
81
|
nav_section = "Redirection"
|
|
78
82
|
title = "404 logs"
|
|
79
83
|
fields = ["created_at", "url", "user_agent", "ip_address", "referer"]
|
|
84
|
+
search_fields = ["url", "user_agent", "ip_address", "referer"]
|
|
85
|
+
allow_global_search = False
|
|
80
86
|
|
|
81
87
|
class DetailView(StaffModelDetailView):
|
|
82
88
|
model = NotFoundLog
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/migrations/0001_initial.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plain_redirection-0.2.0 → plain_redirection-0.2.2}/plain/redirection/migrations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|