plain 0.54.1__py3-none-any.whl → 0.55.0__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,18 @@
1
1
  # plain changelog
2
2
 
3
+ ## [0.55.0](https://github.com/dropseed/plain/releases/plain@0.55.0) (2025-07-22)
4
+
5
+ ### What's changed
6
+
7
+ - Updated URL pattern documentation examples to use `id` instead of `pk` in URL kwargs ([b656ee6](https://github.com/dropseed/plain/commit/b656ee6e4e))
8
+ - Updated views documentation examples to use `id` instead of `pk` for DetailView, UpdateView, and DeleteView ([b656ee6](https://github.com/dropseed/plain/commit/b656ee6e4e))
9
+
10
+ ### Upgrade instructions
11
+
12
+ - Update your URL patterns from `<int:pk>` to `<int:id>` in your URLconf
13
+ - Update view code that accesses `self.url_kwargs["pk"]` to use `self.url_kwargs["id"]` instead
14
+ - Replace any QuerySet filters using `pk` with `id` (e.g., `Model.objects.get(pk=1)` becomes `Model.objects.get(id=1)`)
15
+
3
16
  ## [0.54.1](https://github.com/dropseed/plain/releases/plain@0.54.1) (2025-07-20)
4
17
 
5
18
  ### What's changed
plain/urls/patterns.py CHANGED
@@ -111,8 +111,8 @@ def _route_to_regex(route, is_endpoint=False):
111
111
  """
112
112
  Convert a path pattern into a regular expression. Return the regular
113
113
  expression and a dictionary mapping the capture names to the converters.
114
- For example, 'foo/<int:pk>' returns '^foo\\/(?P<pk>[0-9]+)'
115
- and {'pk': <plain.urls.converters.IntConverter>}.
114
+ For example, 'foo/<int:id>' returns '^foo\\/(?P<id>[0-9]+)'
115
+ and {'id': <plain.urls.converters.IntConverter>}.
116
116
  """
117
117
  original_route = route
118
118
  parts = ["^"]
plain/views/README.md CHANGED
@@ -169,7 +169,7 @@ class ExampleDetailView(DetailView):
169
169
 
170
170
  def get_object(self):
171
171
  return MyObjectClass.objects.get(
172
- pk=self.url_kwargs["pk"],
172
+ id=self.url_kwargs["id"],
173
173
  user=self.request.user, # Limit access
174
174
  )
175
175
 
@@ -187,7 +187,7 @@ class ExampleUpdateView(UpdateView):
187
187
 
188
188
  def get_object(self):
189
189
  return MyObjectClass.objects.get(
190
- pk=self.url_kwargs["pk"],
190
+ id=self.url_kwargs["id"],
191
191
  user=self.request.user, # Limit access
192
192
  )
193
193
 
@@ -201,7 +201,7 @@ class ExampleDeleteView(DeleteView):
201
201
 
202
202
  def get_object(self):
203
203
  return MyObjectClass.objects.get(
204
- pk=self.url_kwargs["pk"],
204
+ id=self.url_kwargs["id"],
205
205
  user=self.request.user, # Limit access
206
206
  )
207
207
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain
3
- Version: 0.54.1
3
+ Version: 0.55.0
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=aLMIJjKzdC_22QdUEhjIy_WBUHj7xZ_6Ub83t3l5jC4,5217
1
+ plain/CHANGELOG.md,sha256=oujiZ46-0jKAXDWTLLOvkKo5VP84iyJWoCgc1jVNjSs,5964
2
2
  plain/README.md,sha256=5BJyKhf0TDanWVbOQyZ3zsi5Lov9xk-LlJYCDWofM6Y,4078
3
3
  plain/__main__.py,sha256=GK39854Lc_LO_JP8DzY9Y2MIQ4cQEl7SXFJy244-lC8,110
4
4
  plain/debug.py,sha256=XdjnXcbPGsi0J2SpHGaLthhYU5AjhBlkHdemaP4sbYY,758
@@ -111,7 +111,7 @@ plain/urls/README.md,sha256=ijFGmrkUY9buBqO_i1GZaN3V55vl9xwEADtHOx_ZHPY,3724
111
111
  plain/urls/__init__.py,sha256=DFO2OL1IllHW5USPIb5uYvvzf_G-Bl0Qu1zrRLHmWyM,542
112
112
  plain/urls/converters.py,sha256=s2JZVOdzZC16lgobsI93hygcdH5L0Kj4742WEkXsVcs,1193
113
113
  plain/urls/exceptions.py,sha256=q4iPh3Aa-zHbA-tw8v6WyX1J1n5WdAady2xvxFuyXB0,114
114
- plain/urls/patterns.py,sha256=7DxL5LWq40lI4hFxAJ2I4MyA3HrbCmNx_dHOk8yYiK8,8259
114
+ plain/urls/patterns.py,sha256=FPWzh2vStzrCqQDkXxjbA58_OMbomOIuYgEOKaEW924,8259
115
115
  plain/urls/resolvers.py,sha256=sZsFQRPlPkogXIVSctZBXJaG0spJzuoJBmtOEZwIXXY,12630
116
116
  plain/urls/routers.py,sha256=B1fX-FQTxmr-b_YeHQUMPuilLVqOi6-RqgPgu6MtFDY,2831
117
117
  plain/urls/utils.py,sha256=lKxTX_A3XJpIH7FjlNYju108stY6-8Sw2uVdiSsxOKQ,1249
@@ -139,7 +139,7 @@ plain/utils/text.py,sha256=42hJv06sadbWfsaAHNhqCQaP1W9qZ69trWDTS-Xva7k,9496
139
139
  plain/utils/timesince.py,sha256=a_-ZoPK_s3Pt998CW4rWp0clZ1XyK2x04hCqak2giII,5928
140
140
  plain/utils/timezone.py,sha256=6u0sE-9RVp0_OCe0Y1KiYYQoq5THWLokZFQYY8jf78g,6221
141
141
  plain/utils/tree.py,sha256=wdWzmfsgc26YDF2wxhAY3yVxXTixQYqYDKE9mL3L3ZY,4383
142
- plain/views/README.md,sha256=_jR_8_eccE1Qwc9sbUhD_hpZGGf0r-HY4W-al6kqtGs,6762
142
+ plain/views/README.md,sha256=iMr_rvag63L0M6rDDHzXEF1dGl5eUQj_0vHwrsgKwgU,6762
143
143
  plain/views/__init__.py,sha256=a-N1nkklVohJTtz0yD1MMaS0g66HviEjsKydNVVjvVc,392
144
144
  plain/views/base.py,sha256=CC9UvMZeAjVvi90vGjoZzsQ0jnhbg3-7qCKQ8-Pb6cg,4184
145
145
  plain/views/csrf.py,sha256=7q6l5xzLWhRnMY64aNj0hR6G-3pxI2yhRwG6k_5j00E,144
@@ -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.54.1.dist-info/METADATA,sha256=3IXeMlX4uiemDSz_MkXPNmC4_kMdqfyvEnMg0mTFAzI,4488
153
- plain-0.54.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
154
- plain-0.54.1.dist-info/entry_points.txt,sha256=nn4uKTRRZuEKOJv3810s3jtSMW0Gew7XDYiKIvBRR6M,93
155
- plain-0.54.1.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
156
- plain-0.54.1.dist-info/RECORD,,
152
+ plain-0.55.0.dist-info/METADATA,sha256=oJV0didL8vjsiZzSYn0FYfA6XNxvyOSaUaL6JXCFujI,4488
153
+ plain-0.55.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
154
+ plain-0.55.0.dist-info/entry_points.txt,sha256=nn4uKTRRZuEKOJv3810s3jtSMW0Gew7XDYiKIvBRR6M,93
155
+ plain-0.55.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
156
+ plain-0.55.0.dist-info/RECORD,,
File without changes