plain 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl

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/debug.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from pprint import pformat
2
2
 
3
- from markupsafe import escape
3
+ from markupsafe import Markup, escape
4
4
 
5
5
  from plain.http import Response
6
6
  from plain.views.exceptions import ResponseException
@@ -18,6 +18,8 @@ def dd(obj):
18
18
 
19
19
  response = Response()
20
20
  response.status_code = 500
21
- response.content = escape(dump_str)
21
+ response.content = (
22
+ Markup("<pre><code>") + escape(dump_str) + Markup("</code></pre>")
23
+ )
22
24
  response.content_type = "text/html"
23
25
  raise ResponseException(response)
@@ -14,7 +14,6 @@ from .messages import (
14
14
  from .registry import register, run_checks
15
15
 
16
16
  # Import these to force registration of checks
17
- import plain.preflight.compatibility.django_4_0 # NOQA isort:skip
18
17
  import plain.preflight.files # NOQA isort:skip
19
18
  import plain.preflight.security.base # NOQA isort:skip
20
19
  import plain.preflight.security.csrf # NOQA isort:skip
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plain
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: A web framework for building products with Python.
5
5
  Author: Dave Gaeddert
6
6
  Author-email: dave.gaeddert@dropseed.dev
@@ -17,7 +17,7 @@ plain/cli/startup.py,sha256=PJYA-tNWGia-QbTlT0e5HvC8C7yDSq8wkAkIxgfKkvw,680
17
17
  plain/csrf/README.md,sha256=RXMWMtHmzf30gVVNOfj0kD4xlSqFIPgJh-n7dIciaEM,163
18
18
  plain/csrf/middleware.py,sha256=I7Ev-Y-VaR-Fgs_arVYNePt4qjwF_PozFBCqER2UMIY,18642
19
19
  plain/csrf/views.py,sha256=YDgT451X16iUdCxpQ6rcHIy7nD0u7DAvCQl5-Mx5i9Y,219
20
- plain/debug.py,sha256=j9HDzue5BXC-Ax__Gg9KvJCFrHjwtydvcZz3PhWgAOM,530
20
+ plain/debug.py,sha256=fdrWy4RNQOuXo80_jgwthCkMZKjjaF9lDj3Kqln_gJk,604
21
21
  plain/exceptions.py,sha256=tDS6l0epe_L9IlxpEdT2k2hWgEoAu8YBNIumNCtJ-WY,6333
22
22
  plain/forms/README.md,sha256=fglB9MmHiEgfGGdZmcRstNl6eYaFljrElu2mzapK52M,377
23
23
  plain/forms/__init__.py,sha256=UxqPwB8CiYPCQdHmUc59jadqaXqDmXBH8y4bt9vTPms,226
@@ -63,9 +63,7 @@ plain/packages/config.py,sha256=6Vdf1TEQllZkkEvK0WK__zHJYT9nxmS3EyYrbuq0GkM,1120
63
63
  plain/packages/registry.py,sha256=Bihdu1sOVslmb2CHAJbMqqzsLIPn0FkqwHoD_JrfZy4,17936
64
64
  plain/paginator.py,sha256=4v5SbYotJH9HoNdzf-1j-AEy4ZLbLPuysf-VME4-6e0,6055
65
65
  plain/preflight/README.md,sha256=fgcfVRD6rq7IO8AffQhk49c-6akxaE8MQidRp69InDQ,59
66
- plain/preflight/__init__.py,sha256=odGgSal4YeWjIG9N2aJzlF1WyEJMx1c7ZP853ZTrbKM,735
67
- plain/preflight/compatibility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- plain/preflight/compatibility/django_4_0.py,sha256=xFxap12rdSSUPW1q9OCcbRLejTxJ04CZfvVL2sdxDBk,636
66
+ plain/preflight/__init__.py,sha256=jQuVhsC8FCEEMTKV1HK3mYz0cD03bI_3_evKcW4X8hw,668
69
67
  plain/preflight/files.py,sha256=wbHCNgps7o1c1zQNBd8FDCaVaqX90UwuvLgEQ_DbUpY,510
70
68
  plain/preflight/messages.py,sha256=u0oc7q7YmBlKYJRcF5SQpzncfOkEzDhZTcpyclQDfHg,2427
71
69
  plain/preflight/registry.py,sha256=ZpxnZPIklXuT8xZVTxCUp_IER3zhd7DdfsmqIpAbLj4,2306
@@ -145,8 +143,8 @@ plain/views/objects.py,sha256=9QBYyb8PgkRirXCQ8-Pms4_yMzP37dfeL30hWRYmtZg,7909
145
143
  plain/views/redirect.py,sha256=KLnlktzK6ZNMTlaEiZpMKQMEP5zeTgGLJ9BIkIJfwBo,1733
146
144
  plain/views/templates.py,sha256=nF9CcdhhjAyp3LB0RrSYnBaHpHzMfPSw719RCdcXk7o,2007
147
145
  plain/wsgi.py,sha256=R6k5FiAElvGDApEbMPTT0MPqSD7n2e2Az5chQqJZU0I,236
148
- plain-0.4.0.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
149
- plain-0.4.0.dist-info/METADATA,sha256=MGKgF5jU6IuhGG4jjdz-ZNTzg4HGry0nIaxmdwTcN9o,2716
150
- plain-0.4.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
151
- plain-0.4.0.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
152
- plain-0.4.0.dist-info/RECORD,,
146
+ plain-0.4.1.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
147
+ plain-0.4.1.dist-info/METADATA,sha256=l7Q6qWK98LKLVsoQ4Fr5Apb5YimjLkIzhUwAO4PSjPE,2716
148
+ plain-0.4.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
149
+ plain-0.4.1.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
150
+ plain-0.4.1.dist-info/RECORD,,
File without changes
@@ -1,20 +0,0 @@
1
- from plain.runtime import settings
2
-
3
- from .. import Error, register
4
-
5
-
6
- @register
7
- def check_csrf_trusted_origins(package_configs, **kwargs):
8
- errors = []
9
- for origin in settings.CSRF_TRUSTED_ORIGINS:
10
- if "://" not in origin:
11
- errors.append(
12
- Error(
13
- "As of Plain 4.0, the values in the CSRF_TRUSTED_ORIGINS "
14
- "setting must start with a scheme (usually http:// or "
15
- "https://) but found %s. See the release notes for details."
16
- % origin,
17
- id="4_0.E001",
18
- )
19
- )
20
- return errors
File without changes
File without changes