plain 0.52.0__py3-none-any.whl → 0.52.2__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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # plain changelog
2
2
 
3
+ ## [0.52.2](https://github.com/dropseed/plain/releases/plain@0.52.2) (2025-06-27)
4
+
5
+ ### What's changed
6
+
7
+ - Improved documentation for the assets subsystem: the `AssetsRouter` reference in the Assets README now links directly to the source code for quicker navigation ([65437e9](https://github.com/dropseed/plain/commit/65437e9bb1a522c7ababe0fc195f63bc5fd6c4d4))
8
+
9
+ ### Upgrade instructions
10
+
11
+ - No changes required
12
+
13
+ ## [0.52.1](https://github.com/dropseed/plain/releases/plain@0.52.1) (2025-06-27)
14
+
15
+ ### What's changed
16
+
17
+ - Fixed `plain help` output on newer versions of Click by switching from `MultiCommand` to `Group` when determining sub-commands ([9482e42](https://github.com/dropseed/plain/commit/9482e421ac408ac043d341edda3dba9f27694f08))
18
+
19
+ ### Upgrade instructions
20
+
21
+ - No changes required
22
+
3
23
  ## [0.52.0](https://github.com/dropseed/plain/releases/plain@0.52.0) (2025-06-26)
4
24
 
5
25
  ### What's changed
plain/assets/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  To serve assets, put them in `app/assets` or `app/{package}/assets`.
8
8
 
9
- Then include the `AssetsRouter` in your own router, typically under the `assets/` path.
9
+ Then include the [`AssetsRouter`](./urls.py#AssetsRouter) in your own router, typically under the `assets/` path.
10
10
 
11
11
  ```python
12
12
  # app/urls.py
@@ -40,7 +40,7 @@ In production, one of your deployment steps should be to compile the assets.
40
40
  plain build
41
41
  ```
42
42
 
43
- By default, this [generates "fingerprinted" and compressed versions of the assets](fingerprints.py#get_file_fingerprint), which are then served by your app. This means that a file like `main.css` will result in two new files, like `main.d0db67b.css` and `main.d0db67b.css.gz`.
43
+ By default, this [generates "fingerprinted" and compressed versions of the assets](./fingerprints.py#get_file_fingerprint), which are then served by your app. This means that a file like `main.css` will result in two new files, like `main.d0db67b.css` and `main.d0db67b.css.gz`.
44
44
 
45
45
  The purpose of fingerprinting the assets is to allow the browser to cache them indefinitely. When the content of the file changes, the fingerprint will change, and the browser will use the newer file. This cuts down on the number of requests that your app has to handle related to assets.
46
46
 
@@ -64,6 +64,8 @@ class AppRouter(Router):
64
64
 
65
65
  ### How do you reference assets in Python code?
66
66
 
67
+ There is a [`get_asset_url`](./urls.py#get_asset_url) function that you can use to get the URL of an asset in Python code. This is useful if you need to reference an asset in a non-template context, such as in a redirect or an API response.
68
+
67
69
  ```python
68
70
  from plain.assets.urls import get_asset_url
69
71
 
@@ -94,7 +96,7 @@ ls .plain/assets/compiled
94
96
  ./example-upload-to-cdn-script
95
97
  ```
96
98
 
97
- Use the `ASSETS_BASE_URL` setting to tell the `{{ asset() }}` template function where to point.
99
+ Use the [`ASSETS_BASE_URL`](../runtime/global_settings.py#ASSETS_BASE_URL) setting to tell the `{{ asset() }}` template function where to point.
98
100
 
99
101
  ```python
100
102
  # app/settings.py
@@ -107,4 +109,4 @@ The default behavior is to fingerprint assets, which is an exact copy of the ori
107
109
 
108
110
  If you need the originals for any reason, you can use `plain build --keep-original`, though this will typically be combined with `--no-fingerprint` otherwise the fingerprinted files will still get priority in `{{ asset() }}` template calls.
109
111
 
110
- Note that by default, the `ASSETS_REDIRECT_ORIGINAL` setting is `True`, which will redirect requests for the original file to the fingerprinted file.
112
+ Note that by default, the [`ASSETS_REDIRECT_ORIGINAL`](../runtime/global_settings.py#ASSETS_REDIRECT_ORIGINAL) setting is `True`, which will redirect requests for the original file to the fingerprinted file.
plain/cli/help.py CHANGED
@@ -1,5 +1,5 @@
1
1
  import click
2
- from click.core import MultiCommand
2
+ from click.core import Group
3
3
 
4
4
 
5
5
  @click.command("help")
@@ -18,7 +18,7 @@ def help_cmd(ctx):
18
18
  click.secho("-" * len(title), fg="green")
19
19
  click.echo(sub_ctx.get_help())
20
20
 
21
- if isinstance(cmd, MultiCommand):
21
+ if isinstance(cmd, Group):
22
22
  for name in cmd.list_commands(sub_ctx):
23
23
  click.echo()
24
24
  sub_cmd = cmd.get_command(sub_ctx, name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain
3
- Version: 0.52.0
3
+ Version: 0.52.2
4
4
  Summary: A web framework for building products with Python.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
@@ -1,4 +1,4 @@
1
- plain/CHANGELOG.md,sha256=G6FJgX85XVgzIKKIvEYLQ_f4Fzp6R0FsEesEpzgPGRE,2945
1
+ plain/CHANGELOG.md,sha256=gfkKcBoXisHose_cDs9fcJb_YFzcvKw8eB4c42mmfiw,3732
2
2
  plain/README.md,sha256=gik6DBZcJAITcm4WRq_L53AxkjY45eQLafyTCSf0CKE,3986
3
3
  plain/__main__.py,sha256=GK39854Lc_LO_JP8DzY9Y2MIQ4cQEl7SXFJy244-lC8,110
4
4
  plain/debug.py,sha256=XdjnXcbPGsi0J2SpHGaLthhYU5AjhBlkHdemaP4sbYY,758
@@ -8,7 +8,7 @@ plain/paginator.py,sha256=iXiOyt2r_YwNrkqCRlaU7V-M_BKaaQ8XZElUBVa6yeU,5844
8
8
  plain/signing.py,sha256=r2KvCOxkrSWCULFxYa9BHYx3L3a2oLq8RDnq_92inTw,8207
9
9
  plain/validators.py,sha256=TePzFHzwR4JXUAZ_Y2vC6mkKgVxHX3QBXI6Oex0rV8c,19236
10
10
  plain/wsgi.py,sha256=R6k5FiAElvGDApEbMPTT0MPqSD7n2e2Az5chQqJZU0I,236
11
- plain/assets/README.md,sha256=wgsmBK5vAHgFMZ010q7LTrgLq5BTfuPuuug5HLZ9GNw,3774
11
+ plain/assets/README.md,sha256=8OW6y4rs0PqGvcbrndPJjOndcDUQUAgnO-Hj_PDHpWI,4151
12
12
  plain/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  plain/assets/compile.py,sha256=DT85ygnNcY2_7VeozdsQlBvA-DzV7enUIMO_igJ1PjY,3296
14
14
  plain/assets/finders.py,sha256=2k8QZAbfUbc1LykxbzdazTSB6xNxJZnsZaGhWbSFZZs,1452
@@ -26,7 +26,7 @@ plain/cli/chores.py,sha256=xXSSFvr8T5jWfLWqe6E8YVMw1BkQxyOHHVuY0x9RH0A,2412
26
26
  plain/cli/core.py,sha256=D3t83ujjjHayblM-RuttrGoNf8hMV9-l3zQsbhVAjWU,2991
27
27
  plain/cli/docs.py,sha256=KCJCP_OVFb34zOkA6x7X6-iGFzx2tv4ZgXAM99TjWNg,7443
28
28
  plain/cli/formatting.py,sha256=1hZH13y1qwHcU2K2_Na388nw9uvoeQH8LrWL-O9h8Yc,2207
29
- plain/cli/help.py,sha256=otRSGxOJ5V8JMjpdZ8XYqUbdlYdJvxOMzQroLOWw-l0,801
29
+ plain/cli/help.py,sha256=NefZSEIixrX_WELVSnJDHRpLDWf7_4PXmkkMm3Q2mzo,787
30
30
  plain/cli/output.py,sha256=Fe3xS6Va4Bi1ZNrqi0nh09THTsdCyMW2b9SPY5I4n-o,1318
31
31
  plain/cli/preflight.py,sha256=FWFwMZ0W_t8ObTTRMnBmaiGN8PqdEAWgmSEPGDwZFpA,4148
32
32
  plain/cli/print.py,sha256=XraUYrgODOJquIiEv78wSCYGRBplHXtXSS9QtFG5hqY,217
@@ -149,8 +149,8 @@ plain/views/forms.py,sha256=ESZOXuo6IeYixp1RZvPb94KplkowRiwO2eGJCM6zJI0,2400
149
149
  plain/views/objects.py,sha256=GGbcfg_9fPZ-PiaBwIHG2e__8GfWDR7JQtQ15wTyiHg,5970
150
150
  plain/views/redirect.py,sha256=daq2cQIkdDF78bt43sjuZxRAyJm_t_SKw6tyPmiXPIc,1985
151
151
  plain/views/templates.py,sha256=ivkI7LU7BXDQ0d4Geab96Is4-Cp03KbIntXRT1J8e6I,2139
152
- plain-0.52.0.dist-info/METADATA,sha256=9Be3llzAmN2bZO2s_UPhej77hxsHZEntBmYbOarzbQw,4297
153
- plain-0.52.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
154
- plain-0.52.0.dist-info/entry_points.txt,sha256=nn4uKTRRZuEKOJv3810s3jtSMW0Gew7XDYiKIvBRR6M,93
155
- plain-0.52.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
156
- plain-0.52.0.dist-info/RECORD,,
152
+ plain-0.52.2.dist-info/METADATA,sha256=rNNWQbg6FlIJB8mElbHG2ZVPjylzN3pOP7ukO-meXlg,4297
153
+ plain-0.52.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
154
+ plain-0.52.2.dist-info/entry_points.txt,sha256=nn4uKTRRZuEKOJv3810s3jtSMW0Gew7XDYiKIvBRR6M,93
155
+ plain-0.52.2.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
156
+ plain-0.52.2.dist-info/RECORD,,
File without changes