plain 0.8.0__py3-none-any.whl → 0.9.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/cli/cli.py CHANGED
@@ -251,7 +251,7 @@ def preflight_checks(package_label, deploy, fail_level, databases):
251
251
  msg = header + body + footer
252
252
  click.echo(msg, err=True)
253
253
  else:
254
- click.echo("Preflight check identified no issues.", err=True)
254
+ click.secho("Preflight check identified no issues.", err=True, fg="green")
255
255
 
256
256
 
257
257
  @plain_cli.command()
plain/runtime/__init__.py CHANGED
@@ -16,7 +16,6 @@ except importlib.metadata.PackageNotFoundError:
16
16
  # Made available without setup or settings
17
17
  APP_PATH = Path.cwd() / "app"
18
18
 
19
-
20
19
  # from plain.runtime import settings
21
20
  settings = Settings()
22
21
 
@@ -38,9 +37,11 @@ def setup():
38
37
  "No app directory found. Are you sure you're in a Plain project?"
39
38
  )
40
39
 
41
- # Automatically put the app dir on the Python path for convenience
42
- if APP_PATH not in sys.path:
43
- sys.path.insert(0, APP_PATH.as_posix())
40
+ # Automatically put the project dir on the Python path
41
+ # which doesn't otherwise happen when you run `plain` commands.
42
+ # This makes "app.<module>" imports and relative imports work.
43
+ if APP_PATH.parent not in sys.path:
44
+ sys.path.insert(0, APP_PATH.parent.as_posix())
44
45
 
45
46
  # Load .env files automatically before settings
46
47
  if app_env := environ.get("PLAIN_ENV", ""):
@@ -59,7 +59,7 @@ SECRET_KEY: str
59
59
  # secret key rotation.
60
60
  SECRET_KEY_FALLBACKS: list[str] = []
61
61
 
62
- ROOT_URLCONF = "urls"
62
+ ROOT_URLCONF = "app.urls"
63
63
 
64
64
  # List of upload handler classes to be applied in order.
65
65
  FILE_UPLOAD_HANDLERS = [
@@ -41,7 +41,7 @@ class Settings:
41
41
 
42
42
  # Determine the settings module
43
43
  if self._settings_module is None:
44
- self._settings_module = os.environ.get(ENVIRONMENT_VARIABLE, "settings")
44
+ self._settings_module = os.environ.get(ENVIRONMENT_VARIABLE, "app.settings")
45
45
 
46
46
  # First load the global settings from plain
47
47
  self._load_module_settings(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plain
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: A web framework for building products with Python.
5
5
  Author: Dave Gaeddert
6
6
  Author-email: dave.gaeddert@dropseed.dev
@@ -9,7 +9,7 @@ plain/assets/urls.py,sha256=ZTIoM1Zq35JaXZ3wFhXhfGa7VoITDNlH9i5RS0R5xow,933
9
9
  plain/assets/views.py,sha256=dhjIpMu0GDR_VGbXM90_6RnC84C2C4bFv1RxDVklGBk,9173
10
10
  plain/cli/README.md,sha256=xjr1K-sIMTi5OWxdxL--O7aoo16Pd1xdawIZtz6BL7Q,2464
11
11
  plain/cli/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
12
- plain/cli/cli.py,sha256=TS9sxJfryyVSH4DlHf3FCpIvn6vF0s56aZ-lGG1MpcE,14817
12
+ plain/cli/cli.py,sha256=Ns6Yi3fhrvvBsE-HrhqtaFoLiegni7d61ypj-MrLjss,14834
13
13
  plain/cli/formatting.py,sha256=1hZH13y1qwHcU2K2_Na388nw9uvoeQH8LrWL-O9h8Yc,2207
14
14
  plain/cli/packages.py,sha256=69VH1bIi1-5N5l2jlBcR5EP0pt-v16sPar9arO3gCSE,2052
15
15
  plain/cli/print.py,sha256=XraUYrgODOJquIiEv78wSCYGRBplHXtXSS9QtFG5hqY,217
@@ -70,9 +70,9 @@ plain/preflight/security/base.py,sha256=nsv-g-bFr_188mkOQwC1ZDnyS0rE6eZED8xZT-FE
70
70
  plain/preflight/security/csrf.py,sha256=8dKzs5kQwTTKeyfHbkrzdPk3OEoUN8mc-0xhSBo1KmM,1175
71
71
  plain/preflight/urls.py,sha256=O4PQ_v205VA2872fQlhPfxaihDDRCsVp0ZVKQ92aX4k,3019
72
72
  plain/runtime/README.md,sha256=Q8VVO7JRGuYrDxzuYL6ptoilhclbecxKzpRXKgbWGkU,2061
73
- plain/runtime/__init__.py,sha256=vIh77lL4e5CoQZz-HxvXeJL5329s8VfPFpNxx9rHgxs,1384
74
- plain/runtime/global_settings.py,sha256=3SLuQjPAHFv5F6QJBiuVy41yxsAoI446Rp4FoK8_A6o,5434
75
- plain/runtime/user_settings.py,sha256=JhxmCCOmEMk0QHh82l5iTpEie-UdZh13aXGsLhE5PBw,11255
73
+ plain/runtime/__init__.py,sha256=WJvN0SVPvsp62doUWhVsdWLW8myx7JDPRjQNxrYHtnQ,1520
74
+ plain/runtime/global_settings.py,sha256=SeW8vVk4rOQyABhRa_5USe8ru_ZDhyiNYz0yhGx0blg,5438
75
+ plain/runtime/user_settings.py,sha256=-1xXUggueuOF3YlgnLfeyG55CUvR3azOGWr2UkTOmfs,11259
76
76
  plain/signals/README.md,sha256=cd3tKEgH-xc88CUWyDxl4-qv-HBXx8VT32BXVwA5azA,230
77
77
  plain/signals/__init__.py,sha256=eAs0kLqptuP6I31dWXeAqRNji3svplpAV4Ez6ktjwXM,131
78
78
  plain/signals/dispatch/__init__.py,sha256=FzEygqV9HsM6gopio7O2Oh_X230nA4d5Q9s0sUjMq0E,292
@@ -141,8 +141,8 @@ plain/views/objects.py,sha256=9QBYyb8PgkRirXCQ8-Pms4_yMzP37dfeL30hWRYmtZg,7909
141
141
  plain/views/redirect.py,sha256=KLnlktzK6ZNMTlaEiZpMKQMEP5zeTgGLJ9BIkIJfwBo,1733
142
142
  plain/views/templates.py,sha256=nF9CcdhhjAyp3LB0RrSYnBaHpHzMfPSw719RCdcXk7o,2007
143
143
  plain/wsgi.py,sha256=R6k5FiAElvGDApEbMPTT0MPqSD7n2e2Az5chQqJZU0I,236
144
- plain-0.8.0.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
145
- plain-0.8.0.dist-info/METADATA,sha256=asx3_JWRlV7rkPuphIVufUKrMXEhYtQmJ-Dd6yVQdzY,2767
146
- plain-0.8.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
147
- plain-0.8.0.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
148
- plain-0.8.0.dist-info/RECORD,,
144
+ plain-0.9.0.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
145
+ plain-0.9.0.dist-info/METADATA,sha256=XgTFVJqheffOIQOTQXS3lyRZpobjro-yfXTWsFCRe7g,2767
146
+ plain-0.9.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
147
+ plain-0.9.0.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
148
+ plain-0.9.0.dist-info/RECORD,,
File without changes
File without changes